summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Use the target-aware constant folder on expressions to improve the chanceNick Lewycky2012-02-211-2/+9
| | | | | | | | | | | | | they'll be simple enough to simulate, and to reduce the chance we'll encounter equal but different simple pointer constants. This removes the symptoms from PR11352 but is not a full fix. A proper fix would either require a guarantee that two constant objects we simulate are folded when equal, or a different way of handling equal pointers (ie., trying a constantexpr icmp on them to see whether we know they're equal or non-equal or unsure). llvm-svn: 151093
* Proper support for a bastardized darwin-eabi hybird ABI.Evan Cheng2012-02-214-8/+7
| | | | llvm-svn: 151083
* s/the the/the/Rafael Espindola2012-02-211-1/+1
| | | | llvm-svn: 151079
* Fix unsigned off-by-one in comment.Benjamin Kramer2012-02-211-1/+1
| | | | llvm-svn: 151056
* InstCombine: Don't transform a signed icmp of two GEPs into a signed compare ↵Benjamin Kramer2012-02-211-0/+8
| | | | | | | | | | | of the indices. This transformation is not safe in some pathological cases (signed icmp of pointers should be an extremely rare thing, but it's valid IR!). Add an explanatory comment. Kudos to Duncan for pointing out this edge case (and not giving up explaining it until I finally got it). llvm-svn: 151055
* Move the implementation of StringRef::split out of StringExtras.cppDuncan Sands2012-02-212-21/+21
| | | | | | and into StringRef.cpp, which is where the other StringRef stuff is. llvm-svn: 151054
* Revert r151049 cos it broke the buildbots.Jay Foad2012-02-212-131/+34
| | | | llvm-svn: 151052
* Tiny cosmetic change to use the same style for all of the while loops inChandler Carruth2012-02-211-2/+4
| | | | | | the normalize routine, especially the empty while loops. llvm-svn: 151050
* PR1210: make uniquing of struct and function types more efficient byJay Foad2012-02-212-34/+131
| | | | | | | | | using a DenseMap and Talin's new GeneralHash, avoiding the need for a temporary std::vector on every lookup. Patch by Meador Inge! llvm-svn: 151049
* Replace a hand rolled loop with a lovely StringRef helper we have theseChandler Carruth2012-02-211-4/+1
| | | | | | days. No functionality changed. llvm-svn: 151048
* Pull the parsing helper functions out of the Triple interface entirely.Chandler Carruth2012-02-211-89/+90
| | | | | | | | | | | | | They're private static methods but we can just make them static functions in the implementation. It makes the implementations a touch more wordy, but takes another chunk out of the header file. Also, take the opportunity to switch the names to the new coding conventions. No functionality changed here. llvm-svn: 151047
* Clean up comments that I missed when changing the triple representation.Chandler Carruth2012-02-211-10/+7
| | | | | | | | Somehow, I even missed the ones I wrote just the other day... Thanks to Matt for the code review. llvm-svn: 151045
* Clear virtual registers after they are no longer referenced.Andrew Trick2012-02-218-6/+42
| | | | | | | | | | | | | Passes after RegAlloc should be able to rely on MRI->getNumVirtRegs() == 0. This makes sharing code for pre/postRA passes more robust. Now, to check if a pass is running before the RA pipeline begins, use MRI->isSSA(). To check if a pass is running after the RA pipeline ends, use !MRI->getNumVirtRegs(). PEI resets virtual regs when it's done scavenging. PTX will either have to provide its own PEI pass or assign physregs. llvm-svn: 151032
* StackSlotColoring does not use a VirtRegMapAndrew Trick2012-02-211-4/+0
| | | | llvm-svn: 151031
* Use more idiomatic assert.Rafael Espindola2012-02-211-2/+2
| | | | llvm-svn: 151026
* Avoid warning on non assert builds.Rafael Espindola2012-02-211-2/+3
| | | | llvm-svn: 151025
* Switch the llvm::Triple class to immediately parse the triple string onChandler Carruth2012-02-212-24/+17
| | | | | | | | | construction. Simplify its interface, implementation, and users accordingly as there is no longer an 'uninitialized' state to check for. Also, fixes a bug lurking in the interface as there was one method that didn't correctly check for initialization. llvm-svn: 151024
* It turns out that with the current scev organization ReuseOrCreateCast cannotRafael Espindola2012-02-211-9/+9
| | | | | | | | | | | | | | know where users will be added. Because of this, it cannot use Builder.GetInsertPoint at all. This patch * removes the FIXME about adding the assert. * adds a comment explaining hy we don't have one. * removes a broken logic that only works for some callers and is not needed since r150884. * adds an assert to caller that would have caught the bug fixed by r150884. llvm-svn: 151015
* Fix some bugs in HMEditor's moveAllOperandsInto logic.Lang Hames2012-02-211-9/+10
| | | | llvm-svn: 151006
* Check for the correct size in the invariant marker.Nick Lewycky2012-02-201-4/+7
| | | | llvm-svn: 151003
* Fix machine-cp by having it to check sub-register indicies. e.g.Evan Cheng2012-02-202-3/+27
| | | | | | | | | | | | ecx = mov eax al = mov ch The second copy is not a nop because the sub-indices of ecx,ch is not the same of that of eax/al. Re-enabled machine-cp. PR11940 llvm-svn: 151002
* Fix 80-column violation.Chad Rosier2012-02-201-1/+2
| | | | llvm-svn: 150998
* InstCombine: Removing the base from the address calculation is only safe ↵Benjamin Kramer2012-02-201-1/+1
| | | | | | when the GEPs are inbounds. llvm-svn: 150978
* Make this a bit prettier and more obvious when a derived type isn'tEric Christopher2012-02-201-1/+3
| | | | | | derived from anything. llvm-svn: 150975
* If a derived type is also a composite type, print that informationEric Christopher2012-02-201-2/+7
| | | | | | too. llvm-svn: 150974
* Add support for runtime languages on our forward declarations.Eric Christopher2012-02-201-2/+5
| | | | llvm-svn: 150973
* InstCombine: When comparing two GEPs that were derived from the same base ↵Benjamin Kramer2012-02-201-0/+14
| | | | | | | | pointer but use different types, expand the offset calculation and to the compare on the offset if profitable. This came up in SmallVector code. llvm-svn: 150962
* InstCombine: Make OptimizePointerDifference more aggressive.Benjamin Kramer2012-02-201-27/+27
| | | | | | | | | - Ignore pointer casts. - Also expand GEPs that aren't constantexprs when they have one use or only constant indices. - We now compile "&foo[i] - &foo[j]" into "i - j". llvm-svn: 150961
* Teach the DAGCombiner that certain loadext nodes followed by ANDs can be ↵James Molloy2012-02-201-0/+82
| | | | | | converted to zeroexts. llvm-svn: 150957
* Improve generated code for extending loads and some trunc stores on ARM.James Molloy2012-02-202-7/+140
| | | | | | Teach TargetSelectionDAG about lengthening loads for vector types and set v4i8 as legal. Allow FP_TO_UINT for v4i16 from v4i32. llvm-svn: 150956
* Make post-ra tail duplication bundle safe. No test case as recent codegenEvan Cheng2012-02-201-3/+6
| | | | | | flow changes have already hidden the bug. rdar://10893812 llvm-svn: 150949
* Rename class Evaluate to Evaluator and put it in an anonymous namespace.Nick Lewycky2012-02-201-12/+17
| | | | llvm-svn: 150947
* fold comparisons of gep'd alloca points with null to false,Chris Lattner2012-02-201-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implementing PR12013. We now compile the testcase to: __Z4testv: ## @_Z4testv ## BB#0: ## %_ZN4llvm15SmallVectorImplIiE9push_backERKi.exit pushq %rbx subq $64, %rsp leaq 32(%rsp), %rbx movq %rbx, (%rsp) leaq 64(%rsp), %rax movq %rax, 16(%rsp) movl $1, 32(%rsp) leaq 36(%rsp), %rax movq %rax, 8(%rsp) leaq (%rsp), %rdi callq __Z1gRN4llvm11SmallVectorIiLj8EEE movq (%rsp), %rdi cmpq %rbx, %rdi je LBB0_2 ## BB#1: callq _free LBB0_2: ## %_ZN4llvm11SmallVectorIiLj8EED1Ev.exit addq $64, %rsp popq %rbx ret instead of: __Z4testv: ## @_Z4testv ## BB#0: pushq %rbx subq $64, %rsp xorl %eax, %eax leaq (%rsp), %rbx addq $32, %rbx movq %rbx, (%rsp) movq %rbx, 8(%rsp) leaq 64(%rsp), %rcx movq %rcx, 16(%rsp) je LBB0_2 ## BB#1: movl $1, 32(%rsp) movq %rbx, %rax LBB0_2: ## %_ZN4llvm15SmallVectorImplIiE9push_backERKi.exit addq $4, %rax movq %rax, 8(%rsp) leaq (%rsp), %rdi callq __Z1gRN4llvm11SmallVectorIiLj8EEE movq (%rsp), %rdi cmpq %rbx, %rdi je LBB0_4 ## BB#3: callq _free LBB0_4: ## %_ZN4llvm11SmallVectorIiLj8EED1Ev.exit addq $64, %rsp popq %rbx ret This doesn't shrink clang noticably though. llvm-svn: 150944
* Move constructors out-of-line and flesh out their documentation. NoChandler Carruth2012-02-201-2/+32
| | | | | | | functionality changed. This is in preparation for some refactoring of how this class behaves. llvm-svn: 150941
* Move EvaluateFunction and EvaluateBlock into a class, and make the class storeNick Lewycky2012-02-191-122/+137
| | | | | | the information that they pass around between them. No functionality change! llvm-svn: 150939
* Silence operator precedence warning.Benjamin Kramer2012-02-191-1/+1
| | | | llvm-svn: 150921
* Remove dead code. Improve llvm_unreachable text. Simplify some control flow.Ahmed Charles2012-02-1917-88/+22
| | | | llvm-svn: 150918
* StringRef'ize EmitSourceFileHeader().Ahmed Charles2012-02-191-1/+1
| | | | llvm-svn: 150917
* Remove some unneeded includes and fix ordering in X86ISelLowering.cpp. ↵Craig Topper2012-02-191-4/+1
| | | | | | Remove unneeded 'using namespace'. llvm-svn: 150916
* Add machinery for pushing live ranges onto bundle starts while bundling.Lang Hames2012-02-191-2/+207
| | | | llvm-svn: 150915
* Simplify moveEnteringDownFrom rules.Lang Hames2012-02-191-11/+3
| | | | llvm-svn: 150914
* Unify all shuffle mask checking functions take a mask and VT instead of ↵Craig Topper2012-02-191-85/+68
| | | | | | VectorShuffleSDNode. llvm-svn: 150913
* Skip through instructions rather than operands when looking for last use slot.Lang Hames2012-02-191-1/+1
| | | | llvm-svn: 150912
* APFloat::toString(): Fix overrun at scanning.NAKAMURA Takumi2012-02-191-1/+1
| | | | | | FYI, clang/test/SemaTemplate/template-id-printing.cpp had been failing due to it on cygwin-clang. llvm-svn: 150911
* Fix TODO and trailing whitespace.Lang Hames2012-02-191-10/+14
| | | | llvm-svn: 150910
* Defer sanity checks on live intervals until after all have been updated. ↵Lang Hames2012-02-191-171/+170
| | | | | | Hold (LiveInterval, LiveRange) pairs to update, rather than vregs. llvm-svn: 150909
* Make a bunch of X86ISelLowering shuffle functions static now that they are ↵Craig Topper2012-02-192-172/+51
| | | | | | no longer needed by isel. llvm-svn: 150908
* comment fix ARM.hJia Liu2012-02-191-1/+1
| | | | llvm-svn: 150904
* some comment fix for X86 and ARMJia Liu2012-02-198-8/+8
| | | | llvm-svn: 150902
* Add vmfunc instruction to X86 assembler and disassembler.Craig Topper2012-02-194-20/+27
| | | | llvm-svn: 150899
OpenPOWER on IntegriCloud