summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Fix a crash in block placement due to an inner loop that happened to beChandler Carruth2011-11-232-1/+45
| | | | | | | | | | | reversed in the function's original ordering, and we happened to encounter it while handling an outer unnatural CFG structure. Thanks to the test case reduced from GCC's source by Benjamin Kramer. This may also fix a crasher in gzip that Duncan reduced for me, but I haven't yet gotten to testing that one. llvm-svn: 145094
* [asan] do not instrument threadlocal globals, this is buggyKostya Serebryany2011-11-232-0/+12
| | | | llvm-svn: 145092
* Undo test commitAnshuman Dasgupta2011-11-221-1/+1
| | | | llvm-svn: 145079
* Test commitAnshuman Dasgupta2011-11-221-1/+1
| | | | llvm-svn: 145078
* add basic PPC register-pressure feedback; adjust the vaarg test to match the ↵Hal Finkel2011-11-225-97/+118
| | | | | | new register-allocation pattern llvm-svn: 145065
* More fixes to the X86InstComments for shuffle instructions. In particular ↵Craig Topper2011-11-223-44/+60
| | | | | | add AVX flavors of many instructions and fix the destination operand for some of the existing AVX entries. llvm-svn: 145063
* Fix a devilish miscompile exposed by block placement. TheChandler Carruth2011-11-222-2/+36
| | | | | | | | | | | | | | | | | | | | | updateTerminator code didn't correctly handle EH terminators in one very specific case. AnalyzeBranch would find no terminator instruction, and so the fallback in updateTerminator is to assume fallthrough. This is correct, but the destination of the fallthrough was assumed to be the first successor. This is *almost always* true, but in certain cases the loop transformations will cause the landing pad to be the first successor! Instead of this brittle logic, actually look through the successors for a non-landing-pad accessor, and to assert if more than one is found. This will hopefully fix some (if not all) of the self host miscompiles with block placement. Thanks to Benjamin Kramer for reporting, Nick Lewycky for an initial stab at a reduction, and Duncan for endless advice on EH (which I know nothing about) as well as reviewing the actual fix. llvm-svn: 145062
* Add configure checking for pread(2) and use it to save a syscall when ↵Benjamin Kramer2011-11-226-2/+18
| | | | | | reading files. llvm-svn: 145061
* Fix an obvious omission in the SelectionDAGBuilder where we wereChandler Carruth2011-11-221-2/+2
| | | | | | | | | | | | | dropping weights on the floor for invokes. This was impeding my writing further test cases for invoke when interacting with probabilities and block placement. No test case as there doesn't appear to be a way to test this stuff. =/ Suggestions for a test case of course welcome. I hope to be able to add test cases that indirectly cover this eventually by adding probabilities to the exceptional edge and reordering blocks as a result. llvm-svn: 145060
* Turn error recovery into an assert.Benjamin Kramer2011-11-221-6/+1
| | | | | | | This was put in because in a certain version of DragonFlyBSD stat(2) lied about the size of some files. This was fixed a long time ago so we can remove the workaround. llvm-svn: 145059
* Add triple to the test.Rafael Espindola2011-11-221-1/+1
| | | | llvm-svn: 145057
* If a register is both an early clobber and part of a tied use, handle the useRafael Espindola2011-11-222-7/+39
| | | | | | | | before the clobber so that we copy the value if needed. Fixes pr11415. llvm-svn: 145056
* Fix shuffle decoding logic to handle UNPCKLPS/UNPCKLPD on 256-bit vectors ↵Craig Topper2011-11-224-21/+73
| | | | | | correctly. Add support for decoding UNPCKHPS/UNPCKHPD for AVX 128-bit and 256-bit forms. llvm-svn: 145055
* Add methods for querying minimum SSE version along with AVX. Simplifies all ↵Craig Topper2011-11-222-43/+38
| | | | | | the places that had to check a version of SSE and AVX. llvm-svn: 145053
* fix typo in commentSebastian Pop2011-11-211-2/+2
| | | | llvm-svn: 145048
* Fix crasher in GVN due to my recent capture tracking changes.Nick Lewycky2011-11-213-1/+13
| | | | llvm-svn: 145047
* Add virtual destructor. Whoops!Nick Lewycky2011-11-212-0/+4
| | | | llvm-svn: 145044
* Lowering for v32i8 to VPUNPCKLBW/VPUNPCKHBW when AVX2 is enabled.Craig Topper2011-11-215-84/+44
| | | | llvm-svn: 145028
* Test case for r145026Craig Topper2011-11-211-0/+43
| | | | llvm-svn: 145027
* Add support for lowering 256-bit shuffles to VPUNPCKL/H for i16, i32, i64 if ↵Craig Topper2011-11-214-47/+115
| | | | | | AVX2 is enabled. llvm-svn: 145026
* Fixing a commentJoe Abbey2011-11-211-1/+1
| | | | llvm-svn: 145025
* Make LowerSIGN_EXTEND_INREG split 256-bit vectors when AVX1 is enabled and ↵Craig Topper2011-11-213-8/+86
| | | | | | use AVX2 shifts when AVX2 is enabled. llvm-svn: 145022
* Less template, more virtual! Refactoring suggested by Chris in code review.Nick Lewycky2011-11-203-128/+132
| | | | llvm-svn: 145014
* Refactor code to use new attribute getters on CallSite for NoCapture and ByVal.Nick Lewycky2011-11-208-12/+19
| | | | | | | | Suggested in code review by Eli. That code in InstCombine looks kinda suspicious. llvm-svn: 145013
* test/CodeGen/X86/block-placement.ll: Relax expressions for Win32.NAKAMURA Takumi2011-11-201-3/+3
| | | | llvm-svn: 145011
* The logic for breaking the CFG in the presence of hot successors didn'tChandler Carruth2011-11-202-3/+65
| | | | | | | | | | | | | | | | properly account for the *global* probability of the edge being taken. This manifested as a very large number of unconditional branches to blocks being merged against the CFG even though they weren't particularly hot within the CFG. The fix is to check whether the edge being merged is both locally hot relative to other successors for the source block, and globally hot compared to other (unmerged) predecessors of the destination block. This introduces a new crasher on GCC single-source, but it's currently behind a flag, and Ben has offered to work on the reduction. =] llvm-svn: 145010
* Make an obviously const interface actually be marked as const.Chandler Carruth2011-11-201-1/+1
| | | | llvm-svn: 145009
* XFAIL this test until I figure out what indvars is doing here (or find ↵Benjamin Kramer2011-11-201-0/+3
| | | | | | someone who does) llvm-svn: 145008
* SCEV: Actually set overflow flags on add expressions.Benjamin Kramer2011-11-201-2/+2
| | | | | | setFlags doesn't modify its arguments. llvm-svn: 145007
* Add some comments to the latest test case I added here to document whatChandler Carruth2011-11-201-1/+22
| | | | | | | | | | | | | | | | | is actually being tested. Also add some FileCheck goodness to much more carefully ensure that the result is the desired result. Before this test would only have failed through an assert failure if the underlying fix were reverted. Also, add some weight metadata and a comment explaining exactly what is going on to a trick section of the test case. Originally, we were getting very unlucky and trying to form a block chain that isn't actually profitable. I'm working on a fix to avoid forming these unprofitable chains, and that would also have masked any failure from this test case. The easy solution is to add some metadata that makes it *really* profitable to form the bad chain here. llvm-svn: 145006
* Add code for lowering v32i8 shifts by a splat to AVX2 immediate shift ↵Craig Topper2011-11-203-57/+95
| | | | | | instructions. Remove 256-bit splat handling from LowerShift as it was already handled by PerformShiftCombine. llvm-svn: 145005
* Use 256-bit vcmpeqd for creating an all ones vector when AVX2 is enabled.Craig Topper2011-11-195-16/+45
| | | | llvm-svn: 145004
* Remove some of the special classes that worked around an old tablegen ↵Craig Topper2011-11-191-100/+50
| | | | | | limitation of not being able to remove redundant bitconverts from patterns. llvm-svn: 145003
* Custom lower AVX2 variable shift intrinsics to shl/srl/sra nodes and remove ↵Craig Topper2011-11-192-74/+42
| | | | | | the intrinsic patterns. llvm-svn: 144999
* Move the handling of unanalyzable branches out of the loop-driven chainChandler Carruth2011-11-192-25/+58
| | | | | | | | | | | | | | | | | | | | | | | | formation phase and into the initial walk of the basic blocks. We essentially pre-merge all blocks where unanalyzable fallthrough exists, as we won't be able to update the terminators effectively after any reorderings. This is quite a bit more principled as there may be CFGs where the second half of the unanalyzable pair has some analyzable predecessor that gets placed first. Then it may get placed next, implicitly breaking the unanalyzable branch even though we never even looked at the part that isn't analyzable. I've included a test case that triggers this (thanks Benjamin yet again!), and I'm hoping to synthesize some more general ones as I dig into related issues. Also, to make this new scheme work we have to be able to handle branches into the middle of a chain, so add this check. We always fallback on the incoming ordering. Finally, this starts to really underscore a known limitation of the current implementation -- we don't consider broken predecessors when merging successors. This can caused major missed opportunities, and is something I'm planning on looking at next (modulo more bug reports). llvm-svn: 144994
* Test cases for SSSE3/AVX integer horizontal add/sub.Craig Topper2011-11-191-0/+170
| | | | llvm-svn: 144990
* Synthesize SSSE3/AVX 128-bit horizontal integer add/sub instructions from ↵Craig Topper2011-11-194-3/+62
| | | | | | add/sub of appropriate shuffle vectors. llvm-svn: 144989
* Collapse X86 PSIGNB/PSIGNW/PSIGND node types.Craig Topper2011-11-194-33/+18
| | | | llvm-svn: 144988
* Extend VPBLENDVB and VPSIGN lowering to work for AVX2.Craig Topper2011-11-194-111/+156
| | | | llvm-svn: 144987
* Remove some unnecessary filtering checks from X86 disassembler table build.Craig Topper2011-11-191-35/+8
| | | | llvm-svn: 144986
* Remove unused parameters from the AVX maskmov classes.Craig Topper2011-11-191-12/+6
| | | | llvm-svn: 144985
* Fix a corner case in updating LoopInfo after fully unrolling an outer loop.Andrew Trick2011-11-182-11/+50
| | | | | | | | | | | The loop tree's inclusive block lists are painful and expensive to update. (I have no idea why they're inclusive). The design was supposed to handle this case but the implementation missed it and my unit tests weren't thorough enough. Fixes PR11335: loop unroll update. llvm-svn: 144970
* Add AVX2 vpbroadcast supportNadav Rotem2011-11-183-28/+204
| | | | llvm-svn: 144967
* [asan] workaround for reg alloc bug 11395: don't instrument functions with ↵Kostya Serebryany2011-11-182-0/+84
| | | | | | large chunks of inline assembler llvm-svn: 144962
* Guard call to getRegForValue with isTypeLegal check to avoid unnecessary ↵Chad Rosier2011-11-181-3/+5
| | | | | | work/dead code. llvm-svn: 144959
* DISubrange supports unsigned lower/upper array bounds, so let's not fake it ↵Devang Patel2011-11-173-6/+43
| | | | | | in the end while emitting DWARF. If a FE needs to encode signed lower/upper array bounds then we need to extend DISubrange or ad DISignedSubrange. llvm-svn: 144937
* quick fix: remove GlobalVariable::GlobalVariable mistakenly commited at ↵Kostya Serebryany2011-11-171-3/+3
| | | | | | r144933. For some reason this compiles on linux llvm-svn: 144936
* Fix an overly general check in SimplifyIndvar to handle useless phi cycles.Andrew Trick2011-11-172-2/+31
| | | | | | | | | | | | | | The right way to check for a binary operation is cast<BinaryOperator>. The original check: cast<Instruction> && numOperands() == 2 would match phi "instructions", leading to an infinite loop in extreme corner case: a useless phi with operands [self, constant] that prior optimization passes failed to remove, being used in the loop by another useless phi, in turn being used by an lshr or udiv. Fixes PR11350: runaway iteration assertion. llvm-svn: 144935
* fall back to explicit list of allowed linkages when instrumenting globals in ↵Kostya Serebryany2011-11-172-2/+11
| | | | | | asan; add a test check that asan does not touch linkonce_odr llvm-svn: 144933
* Fix bug in RefCountedBase/RefCountedBaseVPTR where the reference count was ↵Ted Kremenek2011-11-171-0/+3
| | | | | | accidentally copied as part of the copy constructor. This could result in objects getting leaked because there reference count was too high. llvm-svn: 144931
OpenPOWER on IntegriCloud