summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* fix typosSebastian Pop2012-03-051-7/+7
| | | | llvm-svn: 152035
* remove spaces on empty linesSebastian Pop2012-03-051-9/+9
| | | | llvm-svn: 152034
* This is not a common case, in fact it never happens!Duncan Sands2012-03-051-4/+0
| | | | llvm-svn: 152027
* Switch mem2reg to use the new hashing infrastructure.Chandler Carruth2012-03-051-1/+3
| | | | llvm-svn: 152026
* Replace the ad-hoc hashing in GVN with the new hashing infrastructure.Chandler Carruth2012-03-051-10/+13
| | | | | | | | | | | | | | | | | This implicitly fixes a nasty bug in the GVN hashing (that thankfully could only manifest as a performance bug): actually include the opcode in the hash. The old code started the hash off with the opcode, but then overwrote it with the type pointer. Since this is likely to be pretty hot (GVN being already pretty expensive) I've included a micro-optimization to just not bother with the varargs hashing if they aren't present. I can't measure any change in GVN performance due to this, even with a big test case like Duncan's sqlite one. Everything I see is in the noise floor. That said, this closes a loop hole for a potential scaling problem due to collisions if the opcode were the differentiating aspect of the expression. llvm-svn: 152025
* Switch the TableGen record's string-based DenseMap key to use the newChandler Carruth2012-03-051-5/+11
| | | | | | | | hashing infrastructure. I wonder why we don't just use StringMap here, and I may revisit the issue if I have time, but for now I'm just trying to consolidate. llvm-svn: 152023
* Convert more GenRegisterInfo tables from unsigned to uint16_t to reduce ↵Craig Topper2012-03-0518-61/+61
| | | | | | static data size. llvm-svn: 152016
* Make aliases for shld and shrd match gas. PR12173.Eli Friedman2012-03-051-14/+14
| | | | llvm-svn: 152014
* Stop fixing bad machine code in LiveIntervalAnalysis.Jakob Stoklund Olesen2012-03-041-15/+3
| | | | | | | | The first def of a virtual register cannot also read the register. Assert on such bad machine code instead of trying to fix it. TwoAddressInstructionPass should never create code like that. llvm-svn: 152010
* Stop adding <imp-def> operands when coalescing sub-registers.Jakob Stoklund Olesen2012-03-041-16/+0
| | | | | | | We are already setting <undef> flags, and that is good enough. The <imp-def> operands don't mean anything any more. llvm-svn: 152009
* Use <def,undef> operands when spilling NEON bundles.Jakob Stoklund Olesen2012-03-041-14/+12
| | | | | | | | | | | MachineOperands that define part of a virtual register must have an <undef> flag if they are not intended as read-modify-write operands. The old trick of adding an <imp-def> operand doesn't work any longer. Fixes PR12177. llvm-svn: 152008
* Nick pointed out on IRC that GVN's propagateEquality wasn't propagatingDuncan Sands2012-03-041-1/+11
| | | | | | | | | | equalities into phi node operands for which the equality is known to hold in the incoming basic block. That's because replaceAllDominatedUsesWith wasn't handling phi nodes correctly in general (that this didn't give wrong results was just luck: the specific way GVN uses replaceAllDominatedUsesWith precluded wrong changes to phi nodes). llvm-svn: 152006
* Replace the hashing functions on APInt and APFloat with overloads of theChandler Carruth2012-03-043-106/+29
| | | | | | | | | | | | | | new hash_value infrastructure, and replace their implementations using hash_combine. This removes a complete copy of Jenkin's lookup3 hash function (which is both significantly slower and lower quality than the one implemented in hash_combine) along with a somewhat scary xor-only hash function. Now that APInt and APFloat can be passed directly to hash_combine, simplify the rest of the LLVMContextImpl hashing to use the new infrastructure. llvm-svn: 152004
* Add generic support for hashing StringRef objects using the new hashing library.Chandler Carruth2012-03-041-0/+7
| | | | llvm-svn: 152003
* Do trivial CSE of dead BBs during codegen preparation.Bill Wendling2012-03-041-1/+20
| | | | | | | | Some BBs can become dead after codegen preparation. If we delete them here, it could help enable tail-call optimizations later on. <rdar://problem/10256573> llvm-svn: 152002
* Use uint16_t to store register overlaps to reduce static data.Craig Topper2012-03-0429-68/+68
| | | | llvm-svn: 152001
* Use uint16_t instead of unsigned to store registers in reg classes. Reduces ↵Craig Topper2012-03-046-18/+18
| | | | | | static data size. llvm-svn: 151998
* Use uint16_t to store registers in callee saved register tables to reduce ↵Craig Topper2012-03-0431-52/+52
| | | | | | size of static data. llvm-svn: 151996
* Use uint8_t instead of enums to store values in X86 disassembler table. ↵Craig Topper2012-03-042-4/+4
| | | | | | Shaves 150k off the size of X86DisassemblerDecoder.o llvm-svn: 151995
* Correctly initialize LineSectionSymbol. Thanks to Duncan Sands for noticing it.Rafael Espindola2012-03-032-2/+2
| | | | llvm-svn: 151979
* Include cctype for isdigit. Patch by Stephen Hines.Duncan Sands2012-03-031-0/+1
| | | | llvm-svn: 151973
* LVI: Recognize the form instcombine canonicalizes range checks into when ↵Benjamin Kramer2012-03-021-4/+16
| | | | | | | | | | forming constant ranges. This could probably be made a lot smarter, but this is a common case and doesn't require LVI to scan a lot of code. With this change CVP can optimize away the "shift == 0" case in Hashing.h that only gets hit when "shift" is in a range not containing 0. llvm-svn: 151919
* ASan: use getTypeAllocSize instead of getTypeStoreSize.Evgeniy Stepanov2012-03-021-1/+1
| | | | | | | | | | | | | | | | This change replaces getTypeStoreSize with getTypeAllocSize in AddressSanitizer instrumentation for stack allocations. One case where old behaviour produced undesired results is an optimization in InstCombine pass (PromoteCastOfAllocation), which can replace alloca(T) with alloca(S), where S has the same AllocSize, but a smaller StoreSize. Another case is memcpy(long double => long double), where ASan will poison bytes 10-15 of a stack-allocated long double (StoreSize 10, AllocSize 16, sizeof(long double) = 16). See http://llvm.org/bugs/show_bug.cgi?id=12047 for more context. llvm-svn: 151887
* Prevent obscure and incorrect tail-call optimization.Chad Rosier2012-03-021-0/+5
| | | | | | | | | | | | In this instance we are generating the tail-call during legalizeDAG. The 2nd floor call can't be a tail call because it clobbers %xmm1, which is defined by the first floor call. The first floor call can't be a tail-call because it's not in the tail position. The only reasonable way I could think to fix this in a target-independent manner was to check for glue logic on the copy reg. rdar://10930395 llvm-svn: 151877
* Grammar-o in function name.Eric Christopher2012-03-021-2/+2
| | | | llvm-svn: 151875
* Grammar.Eric Christopher2012-03-021-1/+1
| | | | llvm-svn: 151874
* If the linkage name doesn't exist we're supposed to emit a referenceEric Christopher2012-03-021-4/+3
| | | | | | to the string table for the function name, not the function name. llvm-svn: 151873
* Fix an iterator invalidation problem. operator[] on a DenseMapDan Gohman2012-03-021-8/+28
| | | | | | | can insert a new element, invalidating iterators. Use find instead, and handle the case where the key is not found explicitly. llvm-svn: 151871
* Misc micro-optimizations.Dan Gohman2012-03-021-10/+12
| | | | llvm-svn: 151869
* Revert "Reorder the sections being output to reduce the number of assembler"Eric Christopher2012-03-021-3/+3
| | | | | | | | | The inline table needs to be constructed ahead of time so that it doesn't try to create new strings while we're emitting everything. This reverts commit a8ff9bccb399183cdd5f1c3cec2bda763664b4b0. llvm-svn: 151864
* Neuter the optimization I implemented with r107852 and r108258 which turn someEvan Cheng2012-03-011-8/+12
| | | | | | | | | | | | floating point equality comparisons into integer ones with -ffast-math. The issue is the optimization causes +0.0 != -0.0. Now the optimization is only done when one side is known to be 0.0. The other side's sign bit is masked off for the comparison. rdar://10964603 llvm-svn: 151861
* Switch FoldingSet over to the new hashing infrastructure. We might wantChandler Carruth2012-03-011-18/+2
| | | | | | | | to do more invasive refactoring here to get FoldingSet to use size_t or even hash_code directly, but for now this is a good first step to remove Yet Another Hashing Algorithm from LLVM. llvm-svn: 151859
* Handle regmasks in Thumb1RegisterInfo::saveScavengerRegister().Jakob Stoklund Olesen2012-03-011-0/+5
| | | | | | | | | | | | | | This function could have r12 live across a function call when compiling thumb1 code. The test case for this is not included because it is very long. It must provoke emergency spilling near a function call. The behavior is provoked by MultiSource/Applications/JM/lencod, and it triggers an assertion in the scavenger. <rdar://problem/10963642> llvm-svn: 151855
* Reorder the sections being output to reduce the number of assemblerEric Christopher2012-03-011-3/+3
| | | | | | | | | fixups that are being used to determine section offsets. Reduces the total number of fixups by 50% for a non-trivial testcase. Part of rdar://10413936 llvm-svn: 151852
* ARM use the right opcode for FP<->Integer move in fast-isel.Jim Grosbach2012-03-011-2/+2
| | | | | | rdar://10965031 llvm-svn: 151850
* Minimal changes for LLVM to compile under VS11.Michael J. Spencer2012-03-012-1/+5
| | | | llvm-svn: 151849
* Changes for migrating to using register mask operands.Akira Hatanaka2012-03-016-48/+45
| | | | llvm-svn: 151847
* [Object]David Meyer2012-03-012-0/+11
| | | | | | Add ObjectFile::getLoadName() for retrieving the soname/installname of a shared object. llvm-svn: 151845
* Change ARMInstPrinter::printPredicateOperand() so it will not abort if itKevin Enderby2012-03-011-1/+4
| | | | | | runs into the undefined 15 condition code value. llvm-svn: 151844
* Fix bugs which were introduced when support for base+index floating point loadsAkira Hatanaka2012-03-014-10/+35
| | | | | | | | | | | and stores was added. - SelectAddr should return false if Parent is an unaligned f32 load or store. - Only aligned load and store nodes should be matched to select reg+imm floating point instructions. - MIPS does not have support for f64 unaligned load or store instructions. llvm-svn: 151843
* BumpPtrAllocator: Make sure threshold cannot be initialized with a value ↵Benjamin Kramer2012-03-011-11/+6
| | | | | | | | smaller than the slab size. This replaces r151834 with a simpler fix. llvm-svn: 151842
* If BumpPtrAllocator is requested to allocate a size that exceeds the slab size,Argyrios Kyrtzidis2012-03-011-4/+9
| | | | | | increase the slab size. llvm-svn: 151834
* Add the source file with trivial definitions in it that was missing fromChandler Carruth2012-03-011-0/+29
| | | | | | | | r151822, sorry sorry. =[ We need 'git svn nothave' or some such... llvm-svn: 151824
* Rewrite LLVM's generalized support library for hashing to follow the APIChandler Carruth2012-03-012-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of the proposed standard hashing interfaces (N3333), and to use a modified and tuned version of the CityHash algorithm. Some of the highlights of this change: -- Significantly higher quality hashing algorithm with very well distributed results, and extremely few collisions. Should be close to a checksum for up to 64-bit keys. Very little clustering or clumping of hash codes, to better distribute load on probed hash tables. -- Built-in support for reserved values. -- Simplified API that composes cleanly with other C++ idioms and APIs. -- Better scaling performance as keys grow. This is the fastest algorithm I've found and measured for moderately sized keys (such as show up in some of the uniquing and folding use cases) -- Support for enabling per-execution seeds to prevent table ordering or other artifacts of hashing algorithms to impact the output of LLVM. The seeding would make each run different and highlight these problems during bootstrap. This implementation was tested extensively using the SMHasher test suite, and pased with flying colors, doing better than the original CityHash algorithm even. I've included a unittest, although it is somewhat minimal at the moment. I've also added (or refactored into the proper location) type traits necessary to implement this, and converted users of GeneralHash over. My only immediate concerns with this implementation is the performance of hashing small keys. I've already started working to improve this, and will continue to do so. Currently, the only algorithms faster produce lower quality results, but it is likely there is a better compromise than the current one. Many thanks to Jeffrey Yasskin who did most of the work on the N3333 paper, pair-programmed some of this code, and reviewed much of it. Many thanks also go to Geoff Pike Pike and Jyrki Alakuijala, the original authors of CityHash on which this is heavily based, and Austin Appleby who created MurmurHash and the SMHasher test suite. Also thanks to Nadav, Tobias, Howard, Jay, Nick, Ahmed, and Duncan for all of the review comments! If there are further comments or concerns, please let me know and I'll jump on 'em. llvm-svn: 151822
* Fix a codegen fault in which log2 or exp2 could be dead-code eliminated even ↵James Molloy2012-03-011-2/+4
| | | | | | | | though they could have sideeffects. Only allow log2/exp2 to be converted to an intrinsic if they are declared "readnone". llvm-svn: 151807
* Make TargetRegisterClasses non-virtual by making the only virtual function a ↵Benjamin Kramer2012-03-011-2/+0
| | | | | | | | | | | function pointer. This allows us to make TRC non-polymorphic and value-initializable, eliminating a huge static initializer and a ton of cruft from the generated code. Shrinks ARMBaseRegisterInfo.o by ~100k. llvm-svn: 151806
* Emit the "is an intrinsic overloaded" table as a bitfield.Benjamin Kramer2012-03-012-11/+4
| | | | llvm-svn: 151792
* Pass endian information to constructors. Define separate functions to createAkira Hatanaka2012-03-015-57/+55
| | | | | | | | objects for big endian and little endian targets. Patch by Jack Carter. llvm-svn: 151788
* Make InlineSpiller bundle-aware.Jakob Stoklund Olesen2012-03-011-45/+48
| | | | | | | | | | Simply treat bundles as instructions. Spill code is inserted between bundles, never inside a bundle. Rewrite all operands in a bundle at once. Don't attempt and memory operand folding inside bundles. llvm-svn: 151787
* [Object]David Meyer2012-03-012-0/+41
| | | | | | | | | * Add begin_dynamic_table() / end_dynamic_table() private interface to ELFObjectFile. * Add begin_libraries_needed() / end_libraries_needed() interface to ObjectFile, for grabbing the list of needed libraries for a shared object or dynamic executable. * Implement this new interface completely for ELF, leave stubs for COFF and MachO. * Add 'llvm-readobj' tool for dumping ObjectFile information. llvm-svn: 151785
OpenPOWER on IntegriCloud