summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Print all the moves at a given label instead of just the first one.Rafael Espindola2011-04-263-15/+6
| | | | | | Remove previous DwarfCFI hack. llvm-svn: 130187
* Rename everything to follow LLVM style ... I think.Nick Lewycky2011-04-261-207/+300
| | | | | | | | | | | | | | Add support for switch and indirectbr edges. This works by densely numbering all blocks which have such terminators, and then separately numbering the possible successors. The predecessors write down a number, the successor knows its own number (as a ConstantInt) and sends that and the pointer to the number the predecessor wrote down to the runtime, who looks up the counter in a per-function table. Coverage data should now be functional, but I haven't tested it on anything other than my 2-file synthetic test program for coverage. llvm-svn: 130186
* No relocation produces a SLEB or ULEB, make sure they are handled in MC.Rafael Espindola2011-04-262-11/+15
| | | | llvm-svn: 130181
* Enhance MemDep: When alias analysis returns a partial alias result,Chris Lattner2011-04-262-29/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | return it as a clobber. This allows GVN to do smart things. Enhance GVN to be smart about the case when a small load is clobbered by a larger overlapping load. In this case, forward the value. This allows us to compile stuff like this: int test(void *P) { int tmp = *(unsigned int*)P; return tmp+*((unsigned char*)P+1); } into: _test: ## @test movl (%rdi), %ecx movzbl %ch, %eax addl %ecx, %eax ret which has one load. We already handled the case where the smaller load was from a must-aliased base pointer. llvm-svn: 130180
* Let dwarf writer allocate extra space in the debug location expression. This ↵Devang Patel2011-04-263-8/+12
| | | | | | space, if requested, will be used for complex addresses of the Blocks' variables. llvm-svn: 130178
* Rename a local variable.Devang Patel2011-04-251-17/+21
| | | | llvm-svn: 130171
* Rename a method to match what it really does.Devang Patel2011-04-253-8/+10
| | | | | | s/addVariableAddress/addFrameVariableAddress/g llvm-svn: 130170
* Do not drop a variable's complex address if it is not based on frame base.Devang Patel2011-04-251-1/+5
| | | | | | Observed this while reading code, so I do not have a test case handy here. llvm-svn: 130167
* Fix an iterator invalidation bug.Dan Gohman2011-04-251-9/+16
| | | | llvm-svn: 130166
* mark a large static table static. Pointed out by Michael Ilseman!Chris Lattner2011-04-251-1/+1
| | | | llvm-svn: 130160
* allow adding a FoldingSetNodeID to a FastFoldingSetNode, resolving PR9499,Chris Lattner2011-04-251-0/+5
| | | | | | patch by Johannes Schaub! llvm-svn: 130151
* add a missed bitfield instcombine.Chris Lattner2011-04-251-0/+47
| | | | llvm-svn: 130137
* Lower BlockAddress node when relocation-model is static.Akira Hatanaka2011-04-252-16/+23
| | | | llvm-svn: 130131
* A dbg.declare may not be in entry block, even if it is referring to an ↵Devang Patel2011-04-251-4/+0
| | | | | | incoming argument. However, It is appropriate to emit DBG_VALUE referring to this incoming argument in entry block in MachineFunction. llvm-svn: 130129
* Remove some hard coded CR-LFs. Some of these were the entire files, one ofChandler Carruth2011-04-251-1/+1
| | | | | | | these was just one line of a file. Explicitly set the eol-style property on the files to try and ensure this fix stays. llvm-svn: 130125
* Fix comment typo. Noticed by Liu.Duncan Sands2011-04-251-1/+1
| | | | llvm-svn: 130120
* Simplify the logic. Noticed by aKor.Rafael Espindola2011-04-241-2/+1
| | | | llvm-svn: 130116
* Synchronize the conditions for producing a .cfi_startproc and a .cfi_endproc.Rafael Espindola2011-04-241-1/+1
| | | | | | Fixes PR9787. llvm-svn: 130115
* Fix Target/ARM/Thumb1FrameLowering.h header guard.Sebastian Redl2011-04-241-1/+1
| | | | llvm-svn: 130097
* Give MC/MCDisassembler/Disassembler.h a header guard.Sebastian Redl2011-04-241-0/+6
| | | | llvm-svn: 130096
* Give SplitKit.h a header guard.Sebastian Redl2011-04-241-0/+5
| | | | llvm-svn: 130095
* Fix an assert to check exactly what it says.Jay Foad2011-04-241-1/+1
| | | | llvm-svn: 130093
* PR9214: Convert the DIBuilder API to use ArrayRef.Jay Foad2011-04-241-8/+6
| | | | llvm-svn: 130086
* Remove unused STL header includes.Jay Foad2011-04-2319-23/+0
| | | | llvm-svn: 130068
* Like the coding standards say, do not use "using namespace std".Jay Foad2011-04-231-1/+0
| | | | llvm-svn: 130054
* Silence an overzealous uninitialized variable warning from GCC.Benjamin Kramer2011-04-231-1/+1
| | | | llvm-svn: 130053
* Thumb2 and ARM add/subtract with carry fixes.Andrew Trick2011-04-234-115/+106
| | | | | | | | | | | | | Fixes Thumb2 ADCS and SBCS lowering: <rdar://problem/9275821>. t2ADCS/t2SBCS are now pseudo instructions, consistent with ARM, so the assembly printer correctly prints the 's' suffix. Fixes Thumb2 adde -> SBC matching to check for live/dead carry flags. Fixes the internal ARM machine opcode mnemonic for ADCS/SBCS. Fixes ARM SBC lowering to check for live carry (potential bug). llvm-svn: 130048
* whitespaceAndrew Trick2011-04-231-6/+6
| | | | llvm-svn: 130046
* Teach FastISel to deal with instructions that have two immediate operands.Owen Anderson2011-04-221-10/+27
| | | | llvm-svn: 130033
* Let front-end tie subprogram declaration with subprogram definition directly.Devang Patel2011-04-222-40/+54
| | | | llvm-svn: 130028
* Always compare the cost of region splitting with the cost of per-block ↵Jakob Stoklund Olesen2011-04-221-6/+45
| | | | | | | | splitting. Sometimes it is better to split per block, and we missed those cases. llvm-svn: 130025
* Recommit the fix for rdar://9289512 with a couple tweaks toChris Lattner2011-04-221-17/+54
| | | | | | | | | | | fix bugs exposed by the gcc dejagnu testsuite: 1. The load may actually be used by a dead instruction, which would cause an assert. 2. The load may not be used by the current chain of instructions, and we could move it past a side-effecting instruction. Change how we process uses to define the problem away. llvm-svn: 130018
* Disassembly of A8.6.59 LDR (literal) Encoding T1 (16-bit thumb instruction) ↵Johnny Chen2011-04-221-0/+13
| | | | | | | | | | should print out ldr, not ldr.n. rdar://problem/9267772 llvm-svn: 130008
* DAGCombine: fold "(zext x) == C" into "x == (trunc C)" if the trunc is lossless.Benjamin Kramer2011-04-222-30/+37
| | | | | | | | | | | | On x86 this allows to fold a load into the cmp, greatly reducing register pressure. movzbl (%rdi), %eax cmpl $47, %eax -> cmpb $47, (%rdi) This shaves 8k off gcc.o on i386. I'll leave applying the patch in README.txt to Chris :) llvm-svn: 130005
* Do not leak argument's DbgVariables.Devang Patel2011-04-221-1/+1
| | | | llvm-svn: 130004
* Add asserts.Devang Patel2011-04-221-0/+2
| | | | llvm-svn: 129995
* X86: Try to use a smaller encoding by transforming (X << C1) & C2 into (X & ↵Benjamin Kramer2011-04-221-0/+75
| | | | | | | | | | | | | | | | | | | | | | | (C2 >> C1)) & C1. (Part of PR5039) This tends to happen a lot with bitfield code generated by clang. A simple example for x86_64 is uint64_t foo(uint64_t x) { return (x&1) << 42; } which used to compile into bloated code: shlq $42, %rdi ## encoding: [0x48,0xc1,0xe7,0x2a] movabsq $4398046511104, %rax ## encoding: [0x48,0xb8,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00] andq %rdi, %rax ## encoding: [0x48,0x21,0xf8] ret ## encoding: [0xc3] with this patch we can fold the immediate into the and: andq $1, %rdi ## encoding: [0x48,0x83,0xe7,0x01] movq %rdi, %rax ## encoding: [0x48,0x89,0xf8] shlq $42, %rax ## encoding: [0x48,0xc1,0xe0,0x2a] ret ## encoding: [0xc3] It's possible to save another byte by using 'andl' instead of 'andq' but I currently see no way of doing that without making this code even more complicated. See the TODOs in the code. llvm-svn: 129990
* Use enums for constant values.Eric Christopher2011-04-221-12/+13
| | | | llvm-svn: 129984
* Make the file format strings a little prettier for mach-o.Eric Christopher2011-04-221-16/+12
| | | | llvm-svn: 129980
* Add MachOObjectFile.cpp to cmake.Eric Christopher2011-04-221-0/+1
| | | | llvm-svn: 129978
* Hook in mach-o object files into Object interface.Eric Christopher2011-04-221-1/+1
| | | | llvm-svn: 129976
* Add support for 64-bit object files to Path.Eric Christopher2011-04-221-4/+10
| | | | llvm-svn: 129975
* Add an ObjectFile implementation for mach-o.Eric Christopher2011-04-221-0/+330
| | | | | | Patch by Patrick Walton! llvm-svn: 129974
* 80-col fix.Eric Christopher2011-04-221-1/+1
| | | | llvm-svn: 129973
* In Thumb2 mode, lower frame indix references to:Evan Cheng2011-04-222-9/+13
| | | | | | | | | | | add <rd>, sp, #<imm8> ldr <rd>, [sp, #<imm8>] When the offset from sp is multiple of 4 and in range of 0-1020. This saves code size by utilizing 16-bit instructions. rdar://9321541 llvm-svn: 129971
* TypoEvan Cheng2011-04-221-1/+1
| | | | llvm-svn: 129970
* Delete the other unused variable in this function. Sorry I missed thisChandler Carruth2011-04-221-1/+0
| | | | | | the first time through. llvm-svn: 129969
* Remove an unused variable from a function. This is a likely cut-paste-o.Chandler Carruth2011-04-221-1/+0
| | | | | | | | Silences GCC warning. I wonder why Clang doesn't warn on this... llvm-svn: 129968
* Branch folding is folding a landing pad into a regular BB.Bill Wendling2011-04-221-1/+1
| | | | | | | | | | | | | | | An exception is thrown via a call to _cxa_throw, which we don't expect to return. Therefore, the "true" part of the invoke goes to a BB that has 'unreachable' as its only instruction. This is lowered into an empty MachineBB. The landing pad for this invoke, however, is directly after the "true" MBB. When the empty MBB is removed, the landing pad is directly below the BB with the invoke call. The unconditional branch is removed and then the two blocks are merged together. The testcase is too big for a regression test. <rdar://problem/9305728> llvm-svn: 129965
* Compute the size of the FDE encoding instead of hard coding it. UpdateRafael Espindola2011-04-222-25/+21
| | | | | | X8664_ELFTargetObjectFile::getFDEEncoding to match reality. llvm-svn: 129959
OpenPOWER on IntegriCloud