summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Remove unused argument.Rafael Espindola2011-04-216-30/+22
| | | | llvm-svn: 129955
* Don't pass address spaces to EmitULEB128IntValue.Rafael Espindola2011-04-211-3/+3
| | | | llvm-svn: 129953
* Fix DWARF description of Q registers.Devang Patel2011-04-211-0/+27
| | | | llvm-svn: 129952
* Fix DWARF description of S registers.Devang Patel2011-04-212-0/+44
| | | | llvm-svn: 129947
* Add DW_OP_bit_piece.Devang Patel2011-04-211-0/+1
| | | | llvm-svn: 129945
* Refactor.Devang Patel2011-04-212-30/+35
| | | | llvm-svn: 129938
* PR9214: Convert Metadata API to use ArrayRef.Jay Foad2011-04-218-47/+44
| | | | llvm-svn: 129932
* Don't recycle loop variables.Matt Beaumont-Gay2011-04-211-1/+1
| | | | llvm-svn: 129928
* Allow allocatable ranges from global live range splitting to be split again.Jakob Stoklund Olesen2011-04-213-7/+45
| | | | | | | | | | | | | | | | | | | | | These intervals are allocatable immediately after splitting, but they may be evicted because of later splitting. This is rare, but when it happens they should be split again. The remainder intervals that cannot be allocated after splitting still move directly to spilling. SplitEditor::finish can optionally provide a mapping from new live intervals back to the original interval indexes returned by openIntv(). Each original interval index can map to multiple new intervals after connected components have been separated. Dead code elimination may also add existing intervals to the list. The reverse mapping allows the SplitEditor client to treat the new intervals differently depending on the split region they came from. llvm-svn: 129925
* Fix relative relocations. This is sufficient for running the rust testsuite withRafael Espindola2011-04-211-1/+6
| | | | | | MC :-) llvm-svn: 129923
* As per ARM docs, register Dx is described as DW_OP_regx(256+x) in DWARF.Devang Patel2011-04-211-24/+32
| | | | llvm-svn: 129922
* Add comment in output stream.Devang Patel2011-04-211-0/+3
| | | | llvm-svn: 129921
* Revert r1296656, "Fix rdar://9289512 - not folding load into compare at -O0...",Daniel Dunbar2011-04-211-41/+15
| | | | | | which broke a couple GCC test suite tests at -O0. llvm-svn: 129914
* PTX: Expand useable register spaceJustin Holewinski2011-04-211-6/+226
| | | | llvm-svn: 129913
* ptx: fix parameter orderingChe-Liang Chiou2011-04-211-4/+1
| | | | | | | | | This patch depends on the prior fix r129908 that changes to use std::find, rather than std::binary_search, on unordered array. Patch by Dan Bailey llvm-svn: 129909
* ptx: PTXMachineFunctionInfo no longer sort registers and so should not use ↵Che-Liang Chiou2011-04-211-2/+3
| | | | | | std::binary_search llvm-svn: 129908
* In gcov profiling, give all functions an extra unified return block. This isNick Lewycky2011-04-211-5/+17
| | | | | | | necessary since gcov counts transitions between blocks. It can't see if you've run every line in a straight-line function, so we add an edge for it to notice. llvm-svn: 129905
* Fix think-o: emit all 8 bytes of the EOF marker. Also reflow a line in aNick Lewycky2011-04-211-3/+3
| | | | | | comment for 80 columns. llvm-svn: 129904
* Add independent controls for whether GCOV profiling should emit .gcno files orNick Lewycky2011-04-211-4/+16
| | | | | | | instrument the program to emit .gcda. TODO: we should emit slightly different .gcda files when .gcno emission is off. llvm-svn: 129903
* Structs have elements not parameters. I'm surprised this ever compiled...Nick Lewycky2011-04-201-1/+1
| | | | llvm-svn: 129888
* Remove -use-divmod-libcall. Let targets opt in when they are available.Evan Cheng2011-04-203-6/+4
| | | | llvm-svn: 129884
* Add debug output for rematerializable instructions.Jakob Stoklund Olesen2011-04-203-6/+10
| | | | llvm-svn: 129883
* Permit remat when a virtual register has multiple defs.Jakob Stoklund Olesen2011-04-201-5/+0
| | | | | | | | TII::isTriviallyReMaterializable() shouldn't depend on any properties of the register being defined by the instruction. Rematerialization is going to create a new virtual register anyway. llvm-svn: 129882
* Fix another case of <rdar://problem/9184212> that only occurs with codeCameron Zwarich2011-04-201-31/+44
| | | | | | | generated by llvm-gcc, since llvm-gcc uses 2 i64s for passing a 4 x float vector on ARM rather than an i64 array like Clang. llvm-svn: 129878
* The bitcast case here is actually handled uniformly earlier in the function, soCameron Zwarich2011-04-201-8/+3
| | | | | | delete it. llvm-svn: 129877
* Cleanup some code to better use an early return style in preparation for addingCameron Zwarich2011-04-201-6/+10
| | | | | | more cases. llvm-svn: 129876
* Revert r129846; it's breaking a buildbot. SeeEli Friedman2011-04-201-0/+1
| | | | | | http://google1.osuosl.org:8011/builders/llvm-x86_64-linux-checks/builds/825/steps/test.llvm.stage2/logs/st.ll llvm-svn: 129869
* Prefer cheap registers for busy live ranges.Jakob Stoklund Olesen2011-04-204-13/+61
| | | | | | | | | | | | | | On the x86-64 and thumb2 targets, some registers are more expensive to encode than others in the same register class. Add a CostPerUse field to the TableGen register description, and make it available from TRI->getCostPerUse. This represents the cost of a REX prefix or a 32-bit instruction encoding required by choosing a high register. Teach the greedy register allocator to prefer cheap registers for busy live ranges (as indicated by spill weight). llvm-svn: 129864
* Excise unintended hunk in 129858. <rdar://problem/7662569>Stuart Hastings2011-04-201-5/+0
| | | | llvm-svn: 129862
* ARM byval support. Will be enabled by another patch to the FE. ↵Stuart Hastings2011-04-204-83/+177
| | | | | | <rdar://problem/7662569> llvm-svn: 129858
* sys/Host: Change getHostTriple() to return the full Darwin version on OS X.Daniel Dunbar2011-04-201-4/+1
| | | | llvm-svn: 129852
* PTX: Add intrinsics to list of built-in intrinsics, which allows them to beJustin Holewinski2011-04-2010-34/+80
| | | | | | | | | | used by Clang. To help Clang integration, the PTX target has been split into two targets: ptx32 and ptx64, depending on the desired pointer size. - Add GCCBuiltin class to all intrinsics - Split PTX target into ptx32 and ptx64 llvm-svn: 129851
* Behave like gnu as when a relocation crosses sections.Rafael Espindola2011-04-201-8/+13
| | | | llvm-svn: 129850
* ptx: add integer div and rem instructionChe-Liang Chiou2011-04-201-0/+2
| | | | | | Patched by Dan Bailey llvm-svn: 129848
* ptx: add floating-point comparison to setpChe-Liang Chiou2011-04-201-14/+234
| | | | | | Patched by Dan Bailey llvm-svn: 129847
OpenPOWER on IntegriCloud