aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Temporarily revert r68552. This was causing a failure in the self-hosting LLVMBill Wendling2009-04-0717-231/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | builds. --- Reverse-merging (from foreign repository) r68552 into '.': U test/CodeGen/X86/tls8.ll U test/CodeGen/X86/tls10.ll U test/CodeGen/X86/tls2.ll U test/CodeGen/X86/tls6.ll U lib/Target/X86/X86Instr64bit.td U lib/Target/X86/X86InstrSSE.td U lib/Target/X86/X86InstrInfo.td U lib/Target/X86/X86RegisterInfo.cpp U lib/Target/X86/X86ISelLowering.cpp U lib/Target/X86/X86CodeEmitter.cpp U lib/Target/X86/X86FastISel.cpp U lib/Target/X86/X86InstrInfo.h U lib/Target/X86/X86ISelDAGToDAG.cpp U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp U lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h U lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h U lib/Target/X86/X86ISelLowering.h U lib/Target/X86/X86InstrInfo.cpp U lib/Target/X86/X86InstrBuilder.h U lib/Target/X86/X86RegisterInfo.td git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68560 91177308-0d34-0410-b5e6-96231b3b80d8
* Right now DBG_LABEL are required for llvm.dbg.region_start and ↵Devang Patel2009-04-071-6/+4
| | | | | | llvm.dbg.region_end in non-fast mode also. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68559 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce code duplication on the TLS implementation.Rafael Espindola2009-04-0717-193/+231
| | | | | | | | | | | | This introduces a small regression on the generated code quality in the case we are just computing addresses, not loading values. Will work on it and on X86-64 support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68552 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't attempt to handle aggregate argument values in FastISel; letDan Gohman2009-04-071-1/+5
| | | | | | | SelectionDAG do those. This fixes PR3955. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68546 91177308-0d34-0410-b5e6-96231b3b80d8
* PR2985 / <rdar://problem/6584986>Jim Grosbach2009-04-077-194/+318
| | | | | | | | | | | | When compiling in Thumb mode, only the low (R0-R7) registers are available for most instructions. Breaking the low registers into a new register class handles this. Uses of R12, SP, etc, are handled explicitly where needed with copies inserted to move results into low registers where the rest of the code generator can deal with them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68545 91177308-0d34-0410-b5e6-96231b3b80d8
* fix style.Torok Edwin2009-04-071-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68542 91177308-0d34-0410-b5e6-96231b3b80d8
* Another attempt at fixing PR2975.Torok Edwin2009-04-071-0/+25
| | | | | | | Types can have references to eachother, so we can't just call destroy on them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68523 91177308-0d34-0410-b5e6-96231b3b80d8
* fix rdar://6762290, a crash compiling cxx filt with clang.Chris Lattner2009-04-071-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68500 91177308-0d34-0410-b5e6-96231b3b80d8
* remove empty sectionChris Lattner2009-04-071-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68485 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle 'a' modifier in ARM inline assembly.Bob Wilson2009-04-061-0/+3
| | | | | | | Patch by Richard Pennington. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68464 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r68457, its crashing in make check.Torok Edwin2009-04-061-16/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68459 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach llvm-bcanalyzer to skip over the header we use on LLVM IR files.Chris Lattner2009-04-061-45/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68458 91177308-0d34-0410-b5e6-96231b3b80d8
* fix (part of) memory leak on shutdown. See PR2975.Torok Edwin2009-04-061-0/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68457 91177308-0d34-0410-b5e6-96231b3b80d8
* Let the strcat optimizer return the pointer to the start of the buffer,Ed Schouten2009-04-061-2/+2
| | | | | | | | | | instead of the place where it started to perform the string copy. - PR3661 - Patch by Benjamin Kramer! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68443 91177308-0d34-0410-b5e6-96231b3b80d8
* Map stack based frameindices for spills to zero based indices that can be ↵Sanjiv Gupta2009-04-065-33/+62
| | | | | | accessed based on an external symbol defining the location of temporary data for a function. For example: we have spill slots addressed as foo.tmp + 0, foo.tmp + 1 etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68442 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove bogus include.Nick Lewycky2009-04-041-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68421 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for embedded metadata to LLVM. This introduces two new types ofNick Lewycky2009-04-0410-6/+262
| | | | | | | | | Constant, MDString and MDNode which can only be used by globals with a name that starts with "llvm." or as arguments to a function with the same naming restriction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68420 91177308-0d34-0410-b5e6-96231b3b80d8
* Wrap some lines to fix indentation problems.Bob Wilson2009-04-031-30/+36
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68405 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some comments.Bob Wilson2009-04-031-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68404 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a TargetLowering optimization so that it doesn't duplicateDan Gohman2009-04-031-0/+1
| | | | | | | loads when an input node has multiple uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68398 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: removed IA64AsmPrinter.cpp from lib/Target/IA64/CMakeLists.txtOscar Fuentes2009-04-031-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68384 91177308-0d34-0410-b5e6-96231b3b80d8
* Separate MIPS asmprinterAnton Korobeynikov2009-04-035-3/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68383 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix target library nameAnton Korobeynikov2009-04-031-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68382 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix commentAnton Korobeynikov2009-04-031-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68381 91177308-0d34-0410-b5e6-96231b3b80d8
* Move IA64 asmprinter to separate libraryAnton Korobeynikov2009-04-034-1/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68380 91177308-0d34-0410-b5e6-96231b3b80d8
* Added a x86 dag combine to increase the chances to use aMon P Wang2009-04-031-2/+30
| | | | | | | movq for v2i64 on x86-32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68368 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete ISD::INSERT_SUBREG and ISD::EXTRACT_SUBREG, which are unused.Dan Gohman2009-04-032-20/+0
| | | | | | | | Note that these are distinct from TargetInstrInfo::INSERT_SUBREG and TargetInstrInfo::EXTRACT_SUBREG, which are used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68355 91177308-0d34-0410-b5e6-96231b3b80d8
* use higher level APIs.Chris Lattner2009-04-031-8/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68351 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed build warnings.Sanjiv Gupta2009-04-021-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68333 91177308-0d34-0410-b5e6-96231b3b80d8
* To convert the StopPoint insn into an assembler directive by ISel, we need ↵Sanjiv Gupta2009-04-025-0/+35
| | | | | | to have access to the line number field. So we convert that info as an operand by custom handling DBG_STOPPOINT in legalize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68329 91177308-0d34-0410-b5e6-96231b3b80d8
* Params are not being generated as static globals now. The caller passes them ↵Sanjiv Gupta2009-04-025-53/+133
| | | | | | onto the callee's stack directly and the callee loads the argvals from its own stack. Clang generated frameindexes validatd by recalculating the stack as if all frameindexes represent 1-byte slots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68327 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix build on Linux.Mikhail Glushenkov2009-04-021-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68269 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r68211, with the miscompilations it caused fixed.Owen Anderson2009-04-011-9/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68262 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up pass manager cache after each run.Devang Patel2009-04-011-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68254 91177308-0d34-0410-b5e6-96231b3b80d8
* silence warning in release-asserts build.Chris Lattner2009-04-011-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68253 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm::Triple class for abstracting access to target triples.Daniel Dunbar2009-04-011-0/+183
| | | | | | | | | | | - The code is silly, I'm just amusing myself. Rewrite to be efficient if you like. :) Also, if you wish to debate the proper names of the triple components I'm all ears. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68252 91177308-0d34-0410-b5e6-96231b3b80d8
* Use CHAR_BIT instead of hard-coding 8 in several places where itDan Gohman2009-04-014-7/+8
| | | | | | | | is appropriate. This helps visually differentiate host-oriented calculations from target-oriented calculations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68227 91177308-0d34-0410-b5e6-96231b3b80d8
* Use LLVM type names instead of C type names in comments, to beDan Gohman2009-04-011-5/+5
| | | | | | | less ambiguous and less C-specific. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68219 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR3862: Recognize some ARM-specific constraints for immediates in inlineBob Wilson2009-04-012-0/+145
| | | | | | | assembly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68218 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r68172. It caused regressions inDan Gohman2009-04-011-38/+10
| | | | | | | | | Applications/Burg/burg Applications/ClamAV/clamscan and many other tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68211 91177308-0d34-0410-b5e6-96231b3b80d8
* hopefully fix an apparent build error on windows.Chris Lattner2009-04-011-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68175 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a serious regression I introduced in my previous patch.Chris Lattner2009-04-011-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68173 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance GVN to propagate simple conditionals. This fixes PR3921.Owen Anderson2009-04-011-10/+38
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68172 91177308-0d34-0410-b5e6-96231b3b80d8
* * Fixed spelling of `invertible'Misha Brukman2009-04-011-2/+2
| | | | | | | * Simplified if statement git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68163 91177308-0d34-0410-b5e6-96231b3b80d8
* reimplement BitcodeReaderValueList in terms of WeakVH instead of makingChris Lattner2009-03-312-94/+56
| | | | | | | it be an LLVM IR User object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68156 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the key of ValueRankMap an AssertingVH, so that we die violentlyChris Lattner2009-03-311-6/+7
| | | | | | | if it dangles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68150 91177308-0d34-0410-b5e6-96231b3b80d8
* Add two new classes: WeakVH and AssertingVH. These are both "ValueHandles", Chris Lattner2009-03-311-2/+165
| | | | | | | | | | | | | | | | | | | | which are effectively smart pointers to Value*'s. They are both very light weight and simple, and react to values being destroyed or being RAUW'd. WeakVN does a best effort to follow a value around, including through RAUW operations and will get nulled out of the value is destroyed. This is useful for the eventual "metadata that references a value" work, because it is a reference to a value that does not show up on its use_* list. AssertingVH is a pointer that compiles down to a dumb raw pointer when assertions are disabled. When enabled, it emits an assertion if the pointed-to value is destroyed while it is still being referenced. This is very useful for Maps and other things, and should have caught the recent bugs in CallGraph and Reassociate, for example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68149 91177308-0d34-0410-b5e6-96231b3b80d8
* Throttle back "fold select into operand" transformation. InstCombine should ↵Evan Cheng2009-03-311-52/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not generate selects of two constants unless they are selects of 0 and 1. e.g. define i32 @t1(i32 %c, i32 %x) nounwind { %t1 = icmp eq i32 %c, 0 %t2 = lshr i32 %x, 18 %t3 = select i1 %t1, i32 %t2, i32 %x ret i32 %t3 } was turned into define i32 @t2(i32 %c, i32 %x) nounwind { %t1 = icmp eq i32 %c, 0 %t2 = select i1 %t1, i32 18, i32 0 %t3 = lshr i32 %x, %t2 ret i32 %t3 } For most targets, that means materializing two constants and then a select. e.g. On x86-64 movl %esi, %eax shrl $18, %eax testl %edi, %edi cmovne %esi, %eax ret => xorl %eax, %eax testl %edi, %edi movl $18, %ecx cmovne %eax, %ecx movl %esi, %eax shrl %cl, %eax ret Also, the optimizer and codegen can reason about shl / and / add, etc. by a constant. This optimization will hinder optimizations using ComputeMaskedBits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68142 91177308-0d34-0410-b5e6-96231b3b80d8
* Fully general expansion of integer shift of any size.Evan Cheng2009-03-312-3/+81
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68134 91177308-0d34-0410-b5e6-96231b3b80d8
* i128 shift libcalls are not available on x86.Evan Cheng2009-03-311-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68133 91177308-0d34-0410-b5e6-96231b3b80d8