summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Add a new bit that ImmLeaf's can opt into, which allows them to duck out ofChris Lattner2011-04-183-6/+23
| | | | | | | | the generated FastISel. X86 doesn't need to generate code to match ADD16ri8 since ADD16ri will do just fine. This is a small codesize win in the generated instruction selector. llvm-svn: 129692
* Implement major new fastisel functionality: the matcher can now handle ↵Chris Lattner2011-04-183-51/+251
| | | | | | | | | | | | | | | | | | | | | | | immediates with value constraints on them (when defined as ImmLeaf's). This is particularly important for X86-64, where almost all reg/imm instructions take a i64immSExt32 immediate operand, which has a value constraint. Before this patch we ended up iseling the examples into such amazing code as: movabsq $7, %rax imulq %rax, %rdi movq %rdi, %rax ret now we produce: imulq $7, %rdi, %rax ret This dramatically shrinks the generated code at -O0 on x86-64. llvm-svn: 129691
* relax this test to just check that the lock prefix is encoded properly,Chris Lattner2011-04-181-2/+1
| | | | | | and to not rely on the register allocator's arbitrary operand choices. llvm-svn: 129690
* Revert r129688; it's breaking buildbots.Eli Friedman2011-04-181-3/+1
| | | | llvm-svn: 129689
* More malloc elimination: it's a bad idea to use raw_svector_ostream on aEli Friedman2011-04-181-1/+3
| | | | | | small heap-allocated SmallString because it unconditionally forces a malloc. llvm-svn: 129688
* Make the StringMaps attached to MCContext use the MCContext's allocator; Eli Friedman2011-04-182-9/+11
| | | | | | reduces the number of calls to malloc(). llvm-svn: 129687
* Use an empty ArrayRef instead of an empty std::vector for the Function::get ↵Anders Carlsson2011-04-181-1/+1
| | | | | | overload that takes no parameters. llvm-svn: 129686
* docs: Redefine Heading elements as below;NAKAMURA Takumi2011-04-185-90/+90
| | | | | | | | | H1 ... Title (and might be Chapter in future) H2 ... Section H3 ... Subsection H4 ... Sub-subsection llvm-svn: 129683
* introduce a new OpKind abstraction which wraps up operand flavors in a tidy ↵Chris Lattner2011-04-171-22/+48
| | | | | | | | little wrapper. No functionality change. llvm-svn: 129680
* change OperandsSignature to use SmallVector<char> instead of std::vector<string>Chris Lattner2011-04-172-16/+17
| | | | | | since the strings are always exactly one character, and there are usually only 2-3 operands. llvm-svn: 129678
* since the VT is fixed for a ImmLeaf, there is no reason to expose it to the ↵Chris Lattner2011-04-172-4/+1
| | | | | | matching code. llvm-svn: 129677
* switch the rest of the x86 immediate patterns over to ImmLeaf, Chris Lattner2011-04-171-17/+9
| | | | | | | simplifying them and exposing more information to tblgen. It would be nice if other target authors adopted this as well, particularly arm since it has fastisel. llvm-svn: 129676
* now that predicates have a decent abstraction layer on them, introduce a new Chris Lattner2011-04-175-4/+49
| | | | | | | | | kind of predicate: one that is specific to imm nodes. The predicate function specified here just checks an int64_t directly instead of messing around with SDNode's. The virtue of this is that it means that fastisel and other things can reason about these predicates. llvm-svn: 129675
* Rework our internal representation of node predicates to expose moreChris Lattner2011-04-177-62/+153
| | | | | | | | structure and fix some fixmes. We now have a TreePredicateFn class that handles all of the decoding of these things. This is an internal cleanup that has no impact on the code generated by tblgen. llvm-svn: 129670
* remove some debugging code I added.Chris Lattner2011-04-171-5/+0
| | | | llvm-svn: 129668
* 1. merge fast-isel-shift-imm.ll into fast-isel-x86-64.llChris Lattner2011-04-176-61/+95
| | | | | | | | | | 2. implement rdar://9289501 - fast isel should fold trivial multiplies to shifts 3. teach tblgen to handle shift immediates that are different sizes than the shifted operands, eliminating some code from the X86 fast isel backend. 4. Have FastISel::SelectBinaryOp use (the poorly named) FastEmit_ri_ function instead of FastEmit_ri to simplify code. llvm-svn: 129666
* fix an x86 fast isel issue where we'd completely give up on folding an addressChris Lattner2011-04-172-75/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when we have a global variable base an an index. Instead, just give up on folding the global variable. Before we'd geenrate: _test: ## @test ## BB#0: movq _rtx_length@GOTPCREL(%rip), %rax leaq (%rax), %rax addq %rdi, %rax movzbl (%rax), %eax ret now we generate: _test: ## @test ## BB#0: movq _rtx_length@GOTPCREL(%rip), %rax movzbl (%rax,%rdi), %eax ret The difference is even more significant when there is a scale involved. This fixes rdar://9289558 - total fail with addr mode formation at -O0/x86-64 llvm-svn: 129664
* fix an oversight which caused us to compile the testcase (and otherChris Lattner2011-04-173-9/+22
| | | | | | | | | | | | | | | | | | | less trivial things) into a dummy lea. Before we generated: _test: ## @test movq _G@GOTPCREL(%rip), %rax leaq (%rax), %rax ret now we produce: _test: ## @test movq _G@GOTPCREL(%rip), %rax ret This is part of rdar://9289558 llvm-svn: 129662
* tidy up and reduce indentation.Chris Lattner2011-04-171-37/+39
| | | | llvm-svn: 129661
* Fix rdar://9289512 - not folding load into compare at -O0Chris Lattner2011-04-173-17/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | The basic issue here is that bottom-up isel is matching the branch and compare, and was failing to fold the load into the branch/compare combo. Fixing this (by allowing folding into any instruction of a sequence that is selected) allows us to produce things like: cmpb $0, 52(%rax) je LBB4_2 instead of: movb 52(%rax), %cl cmpb $0, %cl je LBB4_2 This makes the generated -O0 code run a bit faster, but also speeds up compile time by putting less pressure on the register allocator and generating less code. This was one of the biggest classes of missing load folding. Implementing this shrinks 176.gcc's c-decl.s (as a random example) by about 4% in (verbose-asm) line count. llvm-svn: 129656
* split a complex predicate out to a helper function. Simplify two for loops,Chris Lattner2011-04-171-10/+16
| | | | | | | which don't need to check for falling off the end of a block *and* end of phi nodes, since terminators are never phis. llvm-svn: 129655
* Remove working entry from README.Eli Friedman2011-04-172-9/+1
| | | | llvm-svn: 129654
* fix rdar://9289583 - fast isel should handle non-canonical commutative binopsChris Lattner2011-04-172-4/+37
| | | | | | | | | | allowing us to fold the immediate into the 'and' in this case: int test1(int i) { return 8&i; } llvm-svn: 129653
* PR9055: extend the fix to PR4050 (r70179) to apply to zext and anyext.Eli Friedman2011-04-162-2/+25
| | | | | | | Returning a new node makes the code try to replace the old node, which in the included testcase is killed by CSE. llvm-svn: 129650
* Rename a misleadingly-named variable.Frits van Bommel2011-04-161-5/+5
| | | | llvm-svn: 129644
* Add test cases for Jay's r129641 and fix a 32-bit-centric testcase in a file ↵Frits van Bommel2011-04-161-5/+81
| | | | | | with a 64-bit datalayout. llvm-svn: 129643
* Unbreak the MSVC 2010 build.Francois Pichet2011-04-161-1/+2
| | | | | | For further information on this particular issue see: http://connect.microsoft.com/VisualStudio/feedback/details/520043/error-converting-from-null-to-a-pointer-type-in-std-pair llvm-svn: 129642
* Fix bug when checking phi operands in InstCombiner::visitPHINode(),Jay Foad2011-04-161-1/+1
| | | | | | found by code inspection. llvm-svn: 129641
* MSVC needs the return 0 to compile.Francois Pichet2011-04-161-0/+1
| | | | llvm-svn: 129640
* Remove unused variable.Benjamin Kramer2011-04-161-5/+2
| | | | llvm-svn: 129639
* Write out uint64_t as i{0..32},i{33..64} instead of i{0..32},0.Benjamin Kramer2011-04-161-3/+2
| | | | llvm-svn: 129638
* Don't use C++ comments in C code.Nick Lewycky2011-04-161-1/+1
| | | | llvm-svn: 129637
* Put each personality function in a section. This fixes the gnu ld warning:Rafael Espindola2011-04-165-8/+57
| | | | | | error in foo.o; no .eh_frame_hdr table will be created. llvm-svn: 129635
* Correct result when a branch condition is live across a blockStuart Hastings2011-04-161-4/+10
| | | | | | boundary. <rdar://problem/8933028> llvm-svn: 129634
* Fix divmod libcall lowering. Convert to {S|U}DIVREM first and then expand ↵Evan Cheng2011-04-162-71/+96
| | | | | | the node to a libcall. rdar://9280991 llvm-svn: 129633
* Fix cmake build.Rafael Espindola2011-04-161-1/+1
| | | | llvm-svn: 129632
* Move the re-stemming function up top and use it where it's currently inlined.Nick Lewycky2011-04-161-15/+25
| | | | | | | | | | Break the arc-profile code out to a function like the notes emission code is, and reorder the functions in the file. The only functionality change is that we no longer modify the Module when the Module has no debug info to use. llvm-svn: 129631
* Rename LineProfiling to GCOVProfiling to more accurately represent what itNick Lewycky2011-04-169-265/+621
| | | | | | | does. Also mostly implement it. Still a work-in-progress, but generates legal output on crafted test cases. llvm-svn: 129630
* Introduce support to encode Objective-C property information in debugging ↵Devang Patel2011-04-167-2/+133
| | | | | | information generated for an interface. llvm-svn: 129624
* Thumb2 BFC was insufficiently encoded.Johnny Chen2011-04-153-1/+6
| | | | | | rdar://problem/9292717 llvm-svn: 129619
* A8.6.315 VLD3 (single 3-element structure to all lanes)Johnny Chen2011-04-152-0/+17
| | | | | | | | The a bit must be encoded as 0. rdar://problem/9292625 llvm-svn: 129618
* Re-enable test o32_cc_vararg.ll.Akira Hatanaka2011-04-151-3/+0
| | | | llvm-svn: 129616
* Initial work to improve documentation for Clang's diagnostics, from Matthieu ↵Douglas Gregor2011-04-153-3/+74
| | | | | | Monrocq llvm-svn: 129613
* Reverse unnecessary changes made in r129606 and r129608. There is no change ↵Akira Hatanaka2011-04-1534-270/+253
| | | | | | in functionality. llvm-svn: 129612
* Add ORR and EOR to the CMP peephole optimizer. It's hard to get isel to generateCameron Zwarich2011-04-152-4/+31
| | | | | | a case involving EOR, so I only added a test for ORR. llvm-svn: 129610
* Fix some broken links, from Matthieu MonrocqDouglas Gregor2011-04-151-3/+3
| | | | llvm-svn: 129609
* Fix lines that exceed 80 columns. There is no change in functionality.Akira Hatanaka2011-04-152-4/+4
| | | | llvm-svn: 129608
* Add this test back for Darwin.Rafael Espindola2011-04-151-0/+10
| | | | llvm-svn: 129607
* Fix lines that have incorrect indentation or exceed 80 columns. There is no ↵Akira Hatanaka2011-04-1532-270/+299
| | | | | | change in functionality. llvm-svn: 129606
* The AND instruction leaves the V flag unmodified, so it falls victim to the sameCameron Zwarich2011-04-152-7/+28
| | | | | | problem as all of the other instructions we fold with CMPs. llvm-svn: 129602
OpenPOWER on IntegriCloud