summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Revert the business end of r164634, and replace it with a different fix. TheNick Lewycky2012-09-251-7/+4
| | | | | | | | | reason we were getting two of the same alloca is because of a memmove/memcpy which had the same alloca in both the src and dest. Now we detect that case directly. This has the same testcase as before, but fixes a clang test CodeGenObjC/exceptions.m which runs clang -O2. llvm-svn: 164636
* Don't try to promote the same alloca twice. Fixes PR13916!Nick Lewycky2012-09-252-0/+28
| | | | | | | | Chandler, it's not obvious that it's okay that this alloca gets into the list twice to begin with. Please review and see whether this is the fix you really want, but I wanted to get a fix checked in quickly. llvm-svn: 164634
* Add --program-prefix support to buildSebastian Pop2012-09-256-11/+21
| | | | llvm-svn: 164633
* Move remaining methods inside the Attributes class. Merge the 'Attribute' ↵Bill Wendling2012-09-253-87/+80
| | | | | | namespaces. llvm-svn: 164631
* docs: Sphinxify HowToSubmitABugSean Silva2012-09-253-346/+235
| | | | llvm-svn: 164630
* Move Attribute::typeIncompatible inside of the Attributes class.Bill Wendling2012-09-255-14/+15
| | | | llvm-svn: 164629
* TargetLowering interface to set/get minimum block entries for jump tables.Sebastian Pop2012-09-254-2/+21
| | | | | | | | | | | | | | Provide interface in TargetLowering to set or get the minimum number of basic blocks whereby jump tables are generated for switch statements rather than an if sequence. getMinimumJumpTableEntries() defaults to 4. setMinimumJumpTableEntries() allows target configuration. This patch changes the default for the Hexagon architecture to 5 as it improves performance on some benchmarks. llvm-svn: 164628
* Revert r164614 to appease the buildbots.Chad Rosier2012-09-253-222/+7
| | | | llvm-svn: 164627
* Make this test check the transforms it's actually doing. Also add a test that itNick Lewycky2012-09-251-3/+17
| | | | | | doesn't transform the trivially unsafe case. llvm-svn: 164617
* Add missing i64 max/min/umax/umin on 32-bit targetMichael Liao2012-09-255-1/+141
| | | | | | - Turn on atomic6432.ll and add specific test case as well llvm-svn: 164616
* ARM: Darwin BL/BLX relocations to out-of-range symbols.Jim Grosbach2012-09-252-1/+91
| | | | | | | | | | | When a BL/BLX references a symbol in the same translation unit that is out of range, use an external relocation. The linker will use this to generate a branch island rather than a direct reference, allowing the relocation to resolve correctly. rdar://12359919 llvm-svn: 164615
* Expansions for u/srem, using the udiv expansion. More unit tests for udiv ↵Michael Ilseman2012-09-253-7/+222
| | | | | | and u/srem. llvm-svn: 164614
* Consistently specify the assembly variant to MatchInstructionImpl.Bob Wilson2012-09-251-4/+8
| | | | llvm-svn: 164611
* Fix a case where SROA did not correctly detect dead PHI or selects dueChandler Carruth2012-09-252-5/+55
| | | | | | | | to chains or cycles between PHIs and/or selects. Also add a couple of really nice test cases reduced from Kostya's reports in PR13905 and PR13906. Both are fixed by this patch. llvm-svn: 164596
* Change the way the lint sanity checking pass detects misaligned memory accesses.Duncan Sands2012-09-252-8/+24
| | | | | | | | | | | | | | | Previously it was only be able to detect problems if the pointer was a numerical value (eg inttoptr i32 1 to i32*), but not if it was an alloca or globa. The reason was the use of ComputeMaskedBits: imagine you have "alloca i8, align 2", and ask ComputeMaskedBits what it knows about the bits of the alloca pointer. It can tell you that the bottom bit is known zero (due to align 2) but it can't tell you that bit 1 is known one. That's because the address could be an even multiple of 2 rather than an odd multiple, eg it might be a multiple of 4. Thus trying to use KnownOne is ineffective in the case of an alloca as it will never have any bits set. Instead look explicitly for constant offsets from allocas and globals. llvm-svn: 164595
* Fix an illegal tailcall opt where the callee returns a double via xmm while ↵Evan Cheng2012-09-253-4/+36
| | | | | | caller returns x86_fp80 via st0. rdar://12229511 llvm-svn: 164588
* Fix a -Wparentheses warning in the mingw buildNico Weber2012-09-251-1/+1
| | | | llvm-svn: 164587
* Fix a crash in SROA. This was reported independently by Takumi andChandler Carruth2012-09-251-12/+7
| | | | | | | | | | David (I think), but I would appreciate folks verifying that this fixes the big crasher. I'm still working on a reduced test case, but because this was causing problems I wanted to get the fix checked in quickly. llvm-svn: 164585
* Don't forget that strcpy and friends return a pointer to the destination, soNick Lewycky2012-09-252-2/+12
| | | | | | it's not a dead store if that pointer is used. Whoops! llvm-svn: 164583
* Unit tests for IntegerDivision. Currently, just a basic sanity check to ↵Michael Ilseman2012-09-252-0/+55
| | | | | | ensure that the code was generated properly. Future work would be finding some way to test the actual result that would be computed. llvm-svn: 164582
* ARM: 'add Rd, pc, #imm' is an alias for 'adr Rd, #imm'.Jim Grosbach2012-09-252-0/+18
| | | | | | rdar://9795790 llvm-svn: 164577
* Remove unused name of variable to quiet a warning. Also canonicalize aNick Lewycky2012-09-241-3/+3
| | | | | | | declaration to use the same form as in the rest of the file. No functionality change. llvm-svn: 164576
* Mark jump tables in code sections with DataRegion directives.Jim Grosbach2012-09-243-0/+24
| | | | | | | | | Even out-of-line jump tables can be in the code section, so mark them as data-regions for those targets which support the directives. rdar://12362871&12362974 llvm-svn: 164571
* Typo.Chad Rosier2012-09-241-1/+1
| | | | llvm-svn: 164570
* Rather then have a wrapper function, have tblgen instantiate the implementation.Chad Rosier2012-09-246-44/+7
| | | | | | Also remove an unused argument. llvm-svn: 164567
* Clear UNIVERSAL_SDK_PATH setting when building host tools. <rdar://12360497>Bob Wilson2012-09-241-2/+4
| | | | | | | | | I also moved the SDKROOT setting into the make flags, since clearing it from the environment isn't good enough to override a setting on the make command line. That hasn't been a problem but it could be, and it's good to be consistent with the way UNIVERSAL_SDK_PATH is handled. llvm-svn: 164565
* Teach DSE that strcpy, strncpy, strcat and strncat are all stores which may beNick Lewycky2012-09-242-32/+117
| | | | | | dead. llvm-svn: 164561
* Move all the calls to AA.getTargetLibraryInfo() to using a TLI member variable.Nick Lewycky2012-09-241-12/+11
| | | | | | No functionality change. llvm-svn: 164560
* Specify MachinePointerInfo as refering to the argument value and offset of theRoman Divacky2012-09-242-3/+32
| | | | | | | store when handling byval arguments. Thus preventing reordering of the store with load with post-RA scheduler. llvm-svn: 164553
* Rather then have a wrapper function, have tblgen instantiate the implementation.Chad Rosier2012-09-245-18/+2
| | | | llvm-svn: 164548
* Add missing : in CHECK line.Richard Osborne2012-09-241-1/+1
| | | | llvm-svn: 164540
* Add missing check for presence of target data.Richard Osborne2012-09-242-20/+41
| | | | | | This avoids a crash in visitAllocaInst when target data isn't available. llvm-svn: 164539
* Enable the new SROA pass by default.Chandler Carruth2012-09-241-1/+1
| | | | | | Queue the fallout. ;] llvm-svn: 164480
* Address one of the original FIXMEs for the new SROA pass by implementingChandler Carruth2012-09-242-21/+161
| | | | | | | | | | | | | | | | integer promotion analogous to vector promotion. When there is an integer alloca being accessed both as its integer type and as a narrower integer type, promote the narrower access to "insert" and "extract" the smaller integer from the larger one, and make the integer alloca a candidate for promotion. In the new formulation, we don't care about target legal integer or use thresholds to control things. Instead, we only perform this promotion to an integer type which the frontend has already emitted a load or store for. This bounds the scope and prevents optimization passes from coalescing larger and larger entities into a single integer. llvm-svn: 164479
* Emit dtors into proper section while compiling in vcpp-compatible mode.Anton Korobeynikov2012-09-232-12/+31
| | | | | | Patch by Kai! llvm-svn: 164476
* Switch to a signed representation for the dynamic offsets while walkingChandler Carruth2012-09-232-26/+133
| | | | | | | | | | | | | | | | | | | across the uses of the alloca. It's entirely possible for negative numbers to come up here, and in some rare cases simply doing the 2's complement arithmetic isn't the correct decision. Notably, we can't zext the index of the GEP. The definition of GEP is that these offsets are sign extended or truncated to the size of the pointer, and then wrapping 2's complement arithmetic used. This patch fixes an issue that comes up with *no* input from the buildbots or bootstrap afaict. The only place where it manifested, disturbingly, is Clang's own regression test suite. A reduced and targeted collection of tests are added to cope with this. Note that I've tried to pin down the potential cases of overflow, but may have missed some cases. I've tried to add a few cases to test this, but its hard because LLVM has quite limited support for >64bit constructs. llvm-svn: 164475
* Don't do actual work inside an assert statement. Fixes PR11760!Nick Lewycky2012-09-234-4/+9
| | | | llvm-svn: 164474
* Revise test to avoid using of 'grep'Michael Liao2012-09-231-20/+14
| | | | llvm-svn: 164472
* Add LLVM_OVERRIDE to methods that override their base classes.Craig Topper2012-09-2317-66/+73
| | | | llvm-svn: 164471
* Enhance test case of atomic16 to verify inst encoding fixed in r164453.Michael Liao2012-09-221-0/+6
| | | | llvm-svn: 164465
* ARMInstPrinter.cpp: Fix a warning in -Asserts. [-Wunused-variable]NAKAMURA Takumi2012-09-221-0/+2
| | | | llvm-svn: 164459
* Whitespace.NAKAMURA Takumi2012-09-221-2/+2
| | | | llvm-svn: 164458
* Fix edge cases of ARM shift operands in arith instructions.Tim Northover2012-09-223-38/+94
| | | | | | | | | As before with load instructions, oddities like "asr #32", "rrx" could be printed incorrectly. Patch by Chris Lidbury. llvm-svn: 164456
* Fix the handling of edge cases in ARM shifted operands.Tim Northover2012-09-226-8/+151
| | | | | | | | | This patch fixes load/store instructions to handle less common cases like "asr #32", "rrx" properly throughout the MC layer. Patch by Chris Lidbury. llvm-svn: 164455
* Fix 16-bit atomic inst encoding and keep pseudo-inst starting with '#'Michael Liao2012-09-221-14/+14
| | | | llvm-svn: 164453
* Fix typo in r164357Michael Liao2012-09-221-1/+1
| | | | llvm-svn: 164452
* Machine Model (-schedmodel only). Added SchedAliases.Andrew Trick2012-09-224-88/+327
| | | | | | | Allow subtargets to tie SchedReadWrite types to processor specific sequences or variants. llvm-svn: 164451
* Add llvm::getOrdinalSuffix to get the appropriate -st, -nd, -rd, -th suffix.Jordan Rose2012-09-221-0/+19
| | | | | | Used by clang to print parameter indexes. llvm-svn: 164440
* Casting: assert that pointer arguments to isa<> are non-null.Jordan Rose2012-09-221-0/+3
| | | | | | | | This silences several analyzer warnings within LLVM, and provides a slightly nicer crash experience when someone calls isa<>, cast<>, or dyn_cast<> with a null pointer. llvm-svn: 164439
* DenseMap: assert that we have found a bucket before we try to insert into it.Jordan Rose2012-09-221-0/+1
| | | | | | | This silences literally dozens of analyzer warnings on LLVM (since DenseMap is such a commonly-used class). llvm-svn: 164438
OpenPOWER on IntegriCloud