Andrew Trick
d5553c6ad2
Put all IVUsers in the processed set. Allow querying IVUsers with isIVUserOrOperand.
...
llvm-svn: 147686
2012-01-06 21:41:55 +00:00
Benjamin Kramer
509b7e6c60
Kill ObjectCodeEmitter and BinaryObject, they were unused and superseded by MC.
...
llvm-svn: 147618
2012-01-05 22:31:37 +00:00
Danil Malyshev
234aa2c4ea
A small re-factored JIT/MCJIT::getPointerToNamedFunction(), so it could be called with the base class.
...
llvm-svn: 147610
2012-01-05 21:16:14 +00:00
Sebastian Pop
53d6e3b9d3
revert r147542 after comments from Joerg Sonnenberger
...
llvm-svn: 147608
2012-01-05 18:28:46 +00:00
Chris Lattner
8a6a27b69a
allow clients of SmallSet to specify their own comparison function for the set.
...
Patch by Stepan Dyatkovskiy!
llvm-svn: 147607
2012-01-05 17:35:07 +00:00
Andrew Trick
f4817ef455
comment cleanup
...
llvm-svn: 147585
2012-01-05 01:01:01 +00:00
Jakob Stoklund Olesen
a33612c1f2
Freeze reserved registers before starting register allocation.
...
The register allocators don't currently support adding reserved
registers while they are running. Extend the MRI API to keep track of
the set of reserved registers when register allocation started.
Target hooks like hasFP() and needsStackRealignment() can look at this
set to avoid reserving more registers during register allocation.
llvm-svn: 147577
2012-01-05 00:26:49 +00:00
Dan Gohman
f9fb5b3951
Generalize isSafeToSpeculativelyExecute to work on arbitrary
...
Values, rather than just Instructions, since it's interesting
for ConstantExprs too.
llvm-svn: 147560
2012-01-04 23:01:09 +00:00
Benjamin Kramer
dfab20fd0c
Simplify more DenseMap.find users.
...
llvm-svn: 147550
2012-01-04 21:41:24 +00:00
Benjamin Kramer
15f1af87d2
StringMap.find never points to an empty bucket or tombstone, skip the check.
...
llvm-svn: 147546
2012-01-04 20:45:14 +00:00
Benjamin Kramer
503550b85a
Simplify code. No functionality change.
...
Using DenseMap iterators isn't free as they have to check for empty
buckets. Dominator queries are common so this gives a minor speedup.
llvm-svn: 147544
2012-01-04 20:20:08 +00:00
Sebastian Pop
4f82b3a13f
use getHostTriple instead of getDefaultTargetTriple in getClosestTargetForJIT
...
Get back getHostTriple.
For JIT compilation, use the host triple instead of the default
target: this fixes some JIT testcases that used to fail when the
compiler has been configured as a cross compiler.
llvm-svn: 147542
2012-01-04 19:47:22 +00:00
Chris Lattner
4f5ba31205
generalize LLVMContext::emitError to take a twine instead of a StringRef.
...
llvm-svn: 147501
2012-01-03 23:47:05 +00:00
Stepan Dyatkovskiy
7d03628e1e
Fix for PR11652: assertion failures when Type.cpp is compiled with -Os
...
llvm-svn: 147470
2012-01-03 20:04:35 +00:00
Stepan Dyatkovskiy
7d6561f886
Type: replaced usage of ID with getTypeID().
...
llvm-svn: 147446
2012-01-03 14:05:04 +00:00
Benjamin Kramer
fba4e88bc2
PatternMatch: Introduce a matcher for instructions with the "exact" bit. Use it to simplify a few matchers.
...
llvm-svn: 147403
2012-01-01 17:55:30 +00:00
Benjamin Kramer
450513861d
PatternMatch: Simplify code by reusing the Operator class.
...
llvm-svn: 147402
2012-01-01 17:55:23 +00:00
Rafael Espindola
db7319d272
Implement cfi_restore. Patch by Brian Anderson!
...
llvm-svn: 147356
2011-12-29 21:43:03 +00:00
Rafael Espindola
bc8c3d0ca0
Rename Remember and Restore to RememberState and RestoreState for consistency.
...
llvm-svn: 147354
2011-12-29 21:09:08 +00:00
Rafael Espindola
27298c6f33
Implement .cfi_escape. Patch by Brian Anderson!
...
llvm-svn: 147352
2011-12-29 20:24:47 +00:00
Rafael Espindola
1935193ab7
Fix grammar error noticed by Duncan.
...
llvm-svn: 147333
2011-12-29 02:15:06 +00:00
Nick Lewycky
7425820374
Change CaptureTracking to pass a Use* instead of a Value* when a value is
...
captured. This allows the tracker to look at the specific use, which may be
especially interesting for function calls.
Use this to fix 'nocapture' deduction in FunctionAttrs. The existing one does
not iterate until a fixpoint and does not guarantee that it produces the same
result regardless of iteration order. The new implementation builds up a graph
of how arguments are passed from function to function, and uses a bottom-up walk
on the argument-SCCs to assign nocapture. This gets us nocapture more often, and
does so rather efficiently and independent of iteration order.
llvm-svn: 147327
2011-12-28 23:24:21 +00:00
Benjamin Kramer
77f9c9f719
Switch StringMap from an array of structures to a structure of arrays.
...
- -25% memory usage of the main table on x86_64 (was wasted in struct padding).
- no significant performance change.
llvm-svn: 147294
2011-12-27 20:35:07 +00:00
Rafael Espindola
504588a7a3
Section relative fixups are a coff concept, not a x86 one. Replace the
...
x86 specific reloc_coff_secrel32 with a generic FK_SecRel_4.
llvm-svn: 147252
2011-12-24 14:47:52 +00:00
Rafael Espindola
2fc741dfac
Move x86 specific bits of the COFF writer to lib/Target/X86.
...
llvm-svn: 147231
2011-12-24 02:14:02 +00:00
Rafael Espindola
1c25d8bcd4
Define trivial destructor inline.
...
llvm-svn: 147230
2011-12-24 01:53:13 +00:00
Rafael Espindola
fc942cb186
Make GetRelocType pure virtual.
...
llvm-svn: 147229
2011-12-24 01:36:25 +00:00
Mon P Wang
e062e56cab
When not destroying the source, the linker is not remapping the types. Added support
...
to CloneFunctionInto to allow remapping for this case.
llvm-svn: 147217
2011-12-23 02:18:32 +00:00
Chris Lattner
c1c640b408
fix typo
...
llvm-svn: 147159
2011-12-22 19:20:51 +00:00
Rafael Espindola
9c71db357e
Move PPC bits to lib/Target/PowerPC.
...
llvm-svn: 147124
2011-12-22 01:57:09 +00:00
Akira Hatanaka
e7bcf63d98
Local dynamic TLS model for direct object output. Create the correct TLS MIPS
...
ELF relocations.
Patch by Jack Carter.
llvm-svn: 147118
2011-12-22 01:05:17 +00:00
Rafael Espindola
ee837037ee
Move the ARM specific parts of the ELF writer to Target/ARM.
...
llvm-svn: 147115
2011-12-22 00:37:50 +00:00
Lang Hames
4258202987
Fixed typo.
...
llvm-svn: 147113
2011-12-22 00:12:51 +00:00
Jakob Stoklund Olesen
893037ce23
Move common code into an MRI function.
...
llvm-svn: 147071
2011-12-21 19:50:05 +00:00
Manuel Klimek
2147506d8b
Changes the JSON parser to use the SourceMgr.
...
Diagnostics are now emitted via the SourceMgr and we use MemoryBuffer
for buffer management. Switched the code to make use of the trailing
'0' that MemoryBuffer guarantees where it makes sense.
llvm-svn: 147063
2011-12-21 18:16:39 +00:00
Rafael Espindola
8c9b0dea02
Move the X86 specific bits of the ELF writer to the Target/X86 directory.
...
Other targets will follow shortly.
llvm-svn: 147060
2011-12-21 17:30:17 +00:00
Rafael Espindola
f9c7f9e3f3
Reduce the exposure of Triple::OSType in the ELF object writer. This will
...
avoid including ADT/Triple.h in many places when the target specific bits are
moved.
llvm-svn: 147059
2011-12-21 17:00:36 +00:00
Rafael Espindola
2334fc676a
Add const.
...
llvm-svn: 147054
2011-12-21 14:48:04 +00:00
Jakub Staszak
6f3beda2b4
Add some constantness to BranchProbabilityInfo and BlockFrequnencyInfo.
...
llvm-svn: 146986
2011-12-20 20:03:10 +00:00
Devang Patel
a57e0b8f49
Add support to add named metadata operand.
...
Patch by Andrew Wilkins!
llvm-svn: 146984
2011-12-20 19:29:36 +00:00
Manuel Klimek
94bfd4f3fc
Fixes a potential compilation error.
...
Pulling the template implementation into the header to guarantee
that it's visible to all possible instantiations.
llvm-svn: 146973
2011-12-20 11:04:23 +00:00
Manuel Klimek
9661304f32
Pulls the implementation of skip() into JSONParser.
...
This is the first step towards migrating more of the parser
implementation into the parser class.
llvm-svn: 146971
2011-12-20 10:42:52 +00:00
Manuel Klimek
e08a021292
Addressing style issues in JSON parser.
...
llvm-svn: 146968
2011-12-20 09:26:26 +00:00
David Blaikie
576aba04f1
Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
...
llvm-svn: 146960
2011-12-20 02:50:00 +00:00
Chris Lattner
f60c5dadf8
fix typo
...
llvm-svn: 146940
2011-12-20 01:11:37 +00:00
Chris Lattner
151b0ec955
add a method to improve compatibility with SmallVector.
...
llvm-svn: 146928
2011-12-20 00:03:41 +00:00
Dan Gohman
7940e4e81d
Add basic generic CodeGen support for half.
...
llvm-svn: 146927
2011-12-20 00:02:33 +00:00
Evan Cheng
4c77fb5375
Add a if-conversion optimization that allows 'true' side of a diamond to be
...
unpredicated. That is, turn
subeq r0, r1, #1
addne r0, r1, #1
into
sub r0, r1, #1
addne r0, r1, #1
For targets where conditional instructions are always executed, this may be
beneficial. It may remove pseudo anti-dependency in out-of-order execution
CPUs. e.g.
op r1, ...
str r1, [r10] ; end-of-life of r1 as div result
cmp r0, #65
movne r1, #44 ; raw dependency on previous r1
moveq r1, #12
If movne is unpredicated, then
op r1, ...
str r1, [r10]
cmp r0, #65
mov r1, #44 ; r1 written unconditionally
moveq r1, #12
Both mov and moveq are no longer depdendent on the first instruction. This gives
the out-of-order execution engine more freedom to reorder them.
This has passed entire LLVM test suite. But it has not been enabled for any ARM
variant pending more performance evaluation.
rdar://8951196
llvm-svn: 146914
2011-12-19 22:01:30 +00:00
Eli Friedman
53dbd7d97f
Add "using" to silence warnings.
...
llvm-svn: 146913
2011-12-19 21:53:12 +00:00
Eli Friedman
602ab7a677
Attempt to fix PR11607 by shuffling around which class defines which methods.
...
llvm-svn: 146897
2011-12-19 20:06:03 +00:00