aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add ability to set TYPE and FLAGS field for section triviallyChris Lattner2005-07-161-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22454 91177308-0d34-0410-b5e6-96231b3b80d8
* Major refactor of the ELFWriter code. Instead of building up one bigChris Lattner2005-07-162-206/+264
| | | | | | | | | | | | vector that represents the .o file at once, build up a vector for each section of the .o file. This is needed because the .o file writer needs to be able to switch between sections as it emits them (e.g. switch between the .text section and the .rel section when emitting code). This patch has no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22453 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the legalizer how to promote SINT_TO_FP to a wider SINT_TO_FP thatNate Begeman2005-07-162-54/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the target natively supports. This eliminates some special-case code from the x86 backend and generates better code as well. For an i8 to f64 conversion, before & after: _x87 before: subl $2, %esp movb 6(%esp), %al movsbw %al, %ax movw %ax, (%esp) filds (%esp) addl $2, %esp ret _x87 after: subl $2, %esp movsbw 6(%esp), %ax movw %ax, (%esp) filds (%esp) addl $2, %esp ret _sse before: subl $12, %esp movb 16(%esp), %al movsbl %al, %eax cvtsi2sd %eax, %xmm0 addl $12, %esp ret _sse after: subl $12, %esp movsbl 16(%esp), %eax cvtsi2sd %eax, %xmm0 addl $12, %esp ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22452 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the register allocator that movaps is also a move instructionNate Begeman2005-07-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22451 91177308-0d34-0410-b5e6-96231b3b80d8
* A couple more darwinismsNate Begeman2005-07-161-2/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22450 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove all knowledge of UINT_TO_FP from the X86 backend, relying on theChris Lattner2005-07-161-53/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | legalizer to eliminate them. With this comes the expected code quality improvements, such as, for this: double foo(unsigned short X) { return X; } we now generate this: _foo: subl $4, %esp movzwl 8(%esp), %eax movl %eax, (%esp) fildl (%esp) addl $4, %esp ret instead of this: _foo: subl $4, %esp movw 8(%esp), %ax movzwl %ax, %eax ;; Load not folded into this. movl %eax, (%esp) fildl (%esp) addl $4, %esp ret -Chris git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22449 91177308-0d34-0410-b5e6-96231b3b80d8
* Break the code for expanding UINT_TO_FP operations out into its ownChris Lattner2005-07-161-35/+116
| | | | | | | | | | | | | | | SelectionDAGLegalize::ExpandLegalUINT_TO_FP method. Add a new method, PromoteLegalUINT_TO_FP, which allows targets to request that UINT_TO_FP operations be promoted to a larger input type. This is useful for targets that have some UINT_TO_FP or SINT_TO_FP operations but not all of them (like X86). The same should be done with SINT_TO_FP, but this patch does not do that yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22447 91177308-0d34-0410-b5e6-96231b3b80d8
* You can't use config options without config.hChris Lattner2005-07-151-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22446 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR595: These error messages should not be looking at CGI.Name, theyChris Lattner2005-07-151-9/+13
| | | | | | | should be looking at CGI.TheDef->getName(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22445 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed some punctuation.John Criswell2005-07-151-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22443 91177308-0d34-0410-b5e6-96231b3b80d8
* Get closer to fully working scalar FP in SSE regs. This gets singlesourceNate Begeman2005-07-153-52/+53
| | | | | | | working, and Olden/power. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22441 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for printing the sse scalar comparison instruction mnemonics.Nate Begeman2005-07-144-0/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22440 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for a TODO; instructions in .td files can now have argumentsNate Begeman2005-07-141-1/+24
| | | | | | | | | printed as part of the opcode. This allows something like cmp${cc}ss in the x86 backed to be printed as cmpltss, cmpless, etc. depending on what the value of $cc is. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22439 91177308-0d34-0410-b5e6-96231b3b80d8
* Regression test for PR#596: Make sure that negation of a minus doesn'tJohn Criswell2005-07-141-0/+19
| | | | | | | turn into a C predecrement operator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22438 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed PR#596:John Criswell2005-07-142-4/+4
| | | | | | | | | Add parenthesis around the value being negated; that way, if the value begins with a minus sign (e.g. negative integer), we won't generate a C predecrement operator by mistake. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22437 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this use the new autoconf support for finding the executables forChris Lattner2005-07-141-5/+8
| | | | | | | gv and Graphviz. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22434 91177308-0d34-0410-b5e6-96231b3b80d8
* * Correct the AC_DEFINE for LLVM_PATH_GRAPHVIZ to use AC_DEFINE_UNQUOTED soReid Spencer2005-07-143-32/+97
| | | | | | | | we actually get the path and not $GRAPHVIZ as the value. * Add a #define for the gv program (HAVE_GV) and its value LLVM_PATH_GV. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22433 91177308-0d34-0410-b5e6-96231b3b80d8
* As discussed on IRC, this stuff is just for debugging.Chris Lattner2005-07-141-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22432 91177308-0d34-0410-b5e6-96231b3b80d8
* Put the path to the Graphviz program in the #defines so it can be used.Reid Spencer2005-07-143-33/+43
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22430 91177308-0d34-0410-b5e6-96231b3b80d8
* If the Graphviz program is available, use it to visualize dot graphs.Chris Lattner2005-07-141-1/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22429 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of warnings on AlphaReid Spencer2005-07-131-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22428 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement a test for the Graphviz program for Chris Lattner. The symbolReid Spencer2005-07-133-30/+85
| | | | | | | | GRAPHVIZ will contain the path to the program if its found (or "echo Graphviz" if not) and the #define HAVE_GRAPHVIZ will be defined if its found. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22424 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't call pthread_mutexattr_setpshared on FreeBSD because its implementationReid Spencer2005-07-131-0/+2
| | | | | | | of pthreads is missing that call (despite it violating the spec). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22423 91177308-0d34-0410-b5e6-96231b3b80d8
* Note to self: don't introduce memory leaks.Jeff Cohen2005-07-131-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22422 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate tabsJeff Cohen2005-07-131-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22421 91177308-0d34-0410-b5e6-96231b3b80d8
* Win32 support for Mutex class.Jeff Cohen2005-07-135-15/+40
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22420 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Alpha/2005-07-12-TwoMallocCalls.ll and PR593.Chris Lattner2005-07-131-1/+2
| | | | | | | | | | | It is not safe to call LegalizeOp on something that has already been legalized. Instead, just force another iteration of legalization. This could affect all platforms but X86, as this codepath is dynamically dead on X86 (ISD::MEMSET and friends are legal). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22419 91177308-0d34-0410-b5e6-96231b3b80d8
* new testcase for PR593Chris Lattner2005-07-131-0/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22418 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test/Regression/CodeGen/Generic/2005-07-12-memcpy-i64-length.llChris Lattner2005-07-131-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22417 91177308-0d34-0410-b5e6-96231b3b80d8
* new testcase that crashes llc on x86/ppc. Not generated by C/C++ or LLVMChris Lattner2005-07-131-0/+11
| | | | | | | though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22416 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a test that runs the ParallelJIT example program to ensure that theReid Spencer2005-07-132-1/+4
| | | | | | | | | JIT can run against a multi-threaded program without getting its data structures messed up. Also had to add the examples directory to the path for the tests so that ParallelJIT can be found. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22415 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct the file title.Reid Spencer2005-07-121-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22414 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR418:Reid Spencer2005-07-123-1/+312
| | | | | | | | | | | | Add an example program that utilizes multiple threads in the JIT to process work. This was used by Evan Jones as the original test case for ensuring that the ExecutionEngine was thread safe. Original source by Evan Jones (adapted from other LLVM JIT examples) and made LLVM style compliant by Reid Spencer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22411 91177308-0d34-0410-b5e6-96231b3b80d8
* Check in the last of the darwin-specific code necessary to get shootoutNate Begeman2005-07-121-11/+11
| | | | | | | working before modifying the asm printer to use the subtarget info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22408 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some code that moved to the generic asm printer a long time ago.Nate Begeman2005-07-121-84/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22407 91177308-0d34-0410-b5e6-96231b3b80d8
* Update release notes regarding thread-safe JIT.Reid Spencer2005-07-121-4/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22405 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR540:Reid Spencer2005-07-1211-221/+155
| | | | | | | | | | | | | | | | | | | | | | | This patch completes the changes for making lli thread-safe. Here's the list of changes: * The Support/ThreadSupport* files were removed and replaced with the MutexGuard.h file since all ThreadSupport* declared was a Mutex Guard. The implementation of MutexGuard.h is now based on sys::Mutex which hides its implementation and makes it unnecessary to have the -NoSupport.h and -PThreads.h versions of ThreadSupport. * All places in ExecutionEngine that previously referred to "Mutex" now refer to sys::Mutex * All places in ExecutionEngine that previously referred to "MutexLocker" now refer to MutexGuard (this is frivolous but I believe the technically correct name for such a class is "Guard" not a "Locker"). These changes passed all of llvm-test. All we need now are some test cases that actually use multiple threads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22404 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR540:Reid Spencer2005-07-124-0/+315
| | | | | | | | | | Add a Mutex class for thread synchronization in a platform-independent way. The current implementation only supports pthreads. Win32 use of Critical Sections will be added later. The design permits other threading models to be used if (and only if) pthreads is not available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22403 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR540:Reid Spencer2005-07-122-36/+261
| | | | | | | | * Add check for pthread.h * Make sure -lpthread gets added to LIBS if its available git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22402 91177308-0d34-0410-b5e6-96231b3b80d8
* In support of PR418:Reid Spencer2005-07-121-1/+4
| | | | | | | | | | Make sure that -lpthread gets added to LIBS variable which puts it at the end of the tools' link commands, if libpthread.a is found. Add a test for pthread.h so we can use #ifdef HAVE_PTHREAD_H git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22401 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for 64-bit elf filesChris Lattner2005-07-121-16/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22400 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for emitting 64-bit integersChris Lattner2005-07-121-1/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22399 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some apparently undocumented ELF section header flagsChris Lattner2005-07-121-1/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22398 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix povray and minor cleanupsAndrew Lenharth2005-07-121-25/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22397 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up and add comments to the newly implemented subtarget code.Nate Begeman2005-07-121-3/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22396 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new files to Visual Studio projects.Jeff Cohen2005-07-122-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22395 91177308-0d34-0410-b5e6-96231b3b80d8
* I don't know how this ever compiled with gcc, but VC++ correctly rejects it.Jeff Cohen2005-07-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22394 91177308-0d34-0410-b5e6-96231b3b80d8
* VC++ demands that the function returns a valueJeff Cohen2005-07-121-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22393 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up the TargetSubtarget class a bit, removing an unnecessary argumentNate Begeman2005-07-122-7/+2
| | | | | | | to the constructor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22392 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor changes to improve comments and fix the build on _WIN32 systems.Chris Lattner2005-07-122-12/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22391 91177308-0d34-0410-b5e6-96231b3b80d8