Mikhail Glushenkov
92df147ae5
Typo.
...
llvm-svn: 73999
2009-06-23 20:46:00 +00:00
Daniel Dunbar
de4e98afda
Start sketching MCStreamer interface.
...
llvm-svn: 73994
2009-06-23 20:24:17 +00:00
Owen Anderson
5cc4131063
Revert my last series of commits related to Timer and 64-bit atomics. Not all the targets
...
we care about are capable of supporting it.
llvm-svn: 73993
2009-06-23 20:17:22 +00:00
Bill Wendling
de57cfd191
Add include file to get the type for in64_t.
...
llvm-svn: 73991
2009-06-23 20:02:00 +00:00
Chris Lattner
11b61adfc9
add a simple MCImm class.
...
llvm-svn: 73984
2009-06-23 18:58:00 +00:00
Owen Anderson
9262d43c5d
Atomic ops that do arithmetic use signed arithmetic.
...
llvm-svn: 73980
2009-06-23 18:30:27 +00:00
Owen Anderson
ddf74dc986
Actually, these need to be signed integers, not unsigned.
...
llvm-svn: 73978
2009-06-23 18:21:13 +00:00
Owen Anderson
bf45b3e2ad
Use 64-bit integer counters for tracking time, rather than doubles. This will be more atomic op friendly.
...
llvm-svn: 73974
2009-06-23 18:12:30 +00:00
Owen Anderson
9e3df5b67f
Label the existing atomic functions as 32-bit specific, and add a 64-bit one that will be useful in
...
the near future.
llvm-svn: 73971
2009-06-23 18:01:04 +00:00
Chris Lattner
83bfbfa195
add an accessor.
...
llvm-svn: 73966
2009-06-23 17:50:34 +00:00
Owen Anderson
cdf2b2dfea
Add an atomic add operation.
...
llvm-svn: 73964
2009-06-23 17:39:31 +00:00
Douglas Gregor
d967749791
Work around build problem with OpenJDK, which defines X86 as a
...
macro. Fixes PR 4427. Patch by Xerxes Rånby!
llvm-svn: 73961
2009-06-23 17:21:35 +00:00
Owen Anderson
891fe79672
Revert r73923, which broke clang.
...
llvm-svn: 73957
2009-06-23 16:36:10 +00:00
Owen Anderson
977c6b8998
Add guards around timer groups, which can be shared.
...
llvm-svn: 73923
2009-06-22 23:37:06 +00:00
Bob Wilson
2e076c4e02
Add support for ARM's Advanced SIMD (NEON) instruction set.
...
This is still a work in progress but most of the NEON instruction set
is supported.
llvm-svn: 73919
2009-06-22 23:27:02 +00:00
Owen Anderson
04052ec597
Remove the parent pointer from SCEV, since it did not end up being needed.
...
llvm-svn: 73907
2009-06-22 21:57:23 +00:00
Owen Anderson
65b6056e37
SCEVHandle is no more!
...
llvm-svn: 73906
2009-06-22 21:39:50 +00:00
Bruno Cardoso Lopes
a040566fec
Add more methods to gather target specific elf stuff
...
Support for .text relocations, implementing TargetELFWriter overloaded methods for x86/x86_64.
Use a map to track global values to their symbol table indexes
Code cleanup and small fixes
llvm-svn: 73894
2009-06-22 19:16:16 +00:00
Owen Anderson
86837616f7
Banish global state from ScalarEvolution! SCEV uniquing is now done by tables attached to the ScalarEvolution pass.
...
This also throws out the SCEV reference counting scheme, as the the SCEVs now have a lifetime controlled by the
ScalarEvolution pass.
Note that SCEVHandle is now a no-op, and will be remove in a future commit.
llvm-svn: 73892
2009-06-22 18:25:46 +00:00
Dan Gohman
2bc22305d2
Add a getUMinFromMismatchedTypes helper function.
...
llvm-svn: 73883
2009-06-22 15:03:27 +00:00
Dan Gohman
692b46872e
Factor out code for computing umin and smin for SCEV expressions into
...
helper functions. Based on a patch by Nick Lewycky.
llvm-svn: 73869
2009-06-22 03:18:45 +00:00
Dan Gohman
96212b661c
Teach ScalarEvolution how to analyze loops with multiple exit
...
blocks, and also exit blocks with multiple conditions (combined
with (bitwise) ands and ors). It's often infeasible to compute an
exact trip count in such cases, but a useful upper bound can often
be found.
llvm-svn: 73866
2009-06-22 00:31:57 +00:00
Dan Gohman
0104842ee3
Fix ScalarEvolution's backedge-taken count computations to check for
...
overflow when computing a integer division to round up.
Thanks to Nick Lewycky for noticing this!
llvm-svn: 73862
2009-06-21 23:46:38 +00:00
Chris Lattner
2adc9e739c
rename SourceMgr::PrintError to PrintMessage.
...
llvm-svn: 73861
2009-06-21 21:22:11 +00:00
Chris Lattner
976af622a9
move include searching logic from TGLexer to SourceMgr.
...
llvm-svn: 73845
2009-06-21 05:06:04 +00:00
Chris Lattner
fd255754af
Rename TGSourceMgr -> SourceMgr.
...
llvm-svn: 73844
2009-06-21 03:41:50 +00:00
Chris Lattner
526c8cb557
rename TGLoc -> SMLoc.
...
llvm-svn: 73843
2009-06-21 03:39:35 +00:00
Chris Lattner
1b30e1ac45
move TGSourceMgr class out of TableGen into libsupport.
...
llvm-svn: 73842
2009-06-21 03:36:54 +00:00
Chris Lattner
98b13ac6f3
fit in 80 cols
...
llvm-svn: 73838
2009-06-21 01:52:00 +00:00
Chris Lattner
a0022a772b
implement support for lowering subregs when preparing to print
...
LEA64_32r, eliminating a bunch of modifier logic stuff on addr modes.
Implement support for printing mbb labels as operands.
llvm-svn: 73817
2009-06-20 07:03:18 +00:00
Chris Lattner
3672742801
make immediates be int64_t like machineoperand. Add some apis
...
llvm-svn: 73809
2009-06-20 00:47:37 +00:00
Owen Anderson
4ce341cc75
Add debugging code to test for various locking faux-pas's, when running in single threaded mode. This should help improve testing coverage for
...
threading support, without having extensive actually concurrent clients yet.
llvm-svn: 73803
2009-06-20 00:27:21 +00:00
Owen Anderson
0d2de8c35e
Revert r73790, and replace it with a significantly less ugly solution. Rather than trying to make the global reader-writer lock work,
...
create separate recursive mutexes for each value map. The recursive-ness fixes the double-acquiring issue, which having one per ValueMap
lets us continue to maintain some concurrency.
llvm-svn: 73801
2009-06-20 00:24:58 +00:00
Chris Lattner
8d284c7683
stub out some hacky code for wiring up the new asmprinter interfaces
...
on X86. Not useful yet.
llvm-svn: 73799
2009-06-19 23:59:57 +00:00
Dan Gohman
c702fc0e64
Make GetMinTrailingZeros a member function of ScalarEvolution,
...
so that it can access the TargetData member (when available) and
use ValueTracking.h information to compute information for
SCEVUnknown Values.
Also add GetMinLeadingZeros and GetMinSignBits functions,
with minimal implementations.
llvm-svn: 73794
2009-06-19 23:29:04 +00:00
Owen Anderson
b07dd959a4
Fix a serious bug that would cause deadlock during abstract type refinement. The constant creation
...
gets involved, and we end up trying to recursively acquire a writer lock. The fix for this is slightly horrible,
and involves passing a boolean "locked" parameter around in Constants.cpp, but it's better than having locked and
unlocked versions of most of the code.
llvm-svn: 73790
2009-06-19 23:16:19 +00:00
Devang Patel
da10358c84
mv CodeGen/DebugLoc.h Support/DebugLoc.h
...
llvm-svn: 73786
2009-06-19 22:08:58 +00:00
Owen Anderson
383f7b1f08
Fences are expensive. Avoid doing them when we're not in multithreaded mode.
...
llvm-svn: 73777
2009-06-19 17:50:11 +00:00
Owen Anderson
c4baa9b64d
Fix a major typo.
...
Nicolas, this is probably the cause of the failures you were seeing.
llvm-svn: 73770
2009-06-19 17:08:20 +00:00
Duncan Sands
0de39b42ff
Add support for AuroraUX. Patch by evocallaghan.
...
llvm-svn: 73766
2009-06-19 14:40:01 +00:00
Lang Hames
6b2c960cc4
More VNInfo tweaking, plus a little progress on intra-block splitting.
...
llvm-svn: 73750
2009-06-19 02:17:53 +00:00
Zhongxing Xu
db371e376d
Include DataTypes.h for 'uint64_t'.
...
llvm-svn: 73748
2009-06-19 01:56:53 +00:00
Owen Anderson
60502b9ba0
Fix weird class-size-being-different problems. At some level this is being caused by config.h not being
...
included everywhere.
llvm-svn: 73745
2009-06-19 00:48:22 +00:00
Chris Lattner
3235c38dbb
Add some scaffolding for a new experimental asmprinter
...
implementation. The idea is that we want asmprinting to
work by converting MachineInstrs into a new MCInst class,
then the per-instruction asmprinter works on MCInst. MCInst
and the new asmprinters will not depend on most of the
llvm code generators. This allows building diassemblers
that don't link in the whole llvm code generator. This is
step #1 of many.
llvm-svn: 73743
2009-06-19 00:47:33 +00:00
Chris Lattner
8284b66264
merge the common darwin settings from the X86/PPC/ARM targets
...
into DarwinTargetAsmInfo.cpp. The remaining differences should
be evaluated. It seems strange that x86/arm has .zerofill but ppc
doesn't, etc.
llvm-svn: 73742
2009-06-19 00:08:39 +00:00
Chris Lattner
b84764516d
move mangler quote handling from asm printers to TargetAsmInfo.
...
llvm-svn: 73738
2009-06-18 23:41:35 +00:00
Chris Lattner
09081b25a5
simplify macro debug info directive handling.
...
llvm-svn: 73736
2009-06-18 23:31:37 +00:00
Owen Anderson
38830b19e9
Add a parent pointer to SCEV, in preparation for getting rid of the global uniquing tables. No functionality change.
...
llvm-svn: 73728
2009-06-18 22:25:12 +00:00
Owen Anderson
5a6960fcc3
Add a SmartScopedLock, and use it to simplify code.
...
llvm-svn: 73722
2009-06-18 20:51:00 +00:00
Anton Korobeynikov
6ee547bb1b
Revert IRBuilder CC propagation. Fix SimplifyLibCalls instead.
...
llvm-svn: 73715
2009-06-18 20:05:31 +00:00
Owen Anderson
6c634f39ce
Simplify the SmartMutex implementation a bit.
...
llvm-svn: 73711
2009-06-18 18:29:03 +00:00
Owen Anderson
1498a7a510
Give RWMutex the SmartRWMutex treatment too.
...
llvm-svn: 73710
2009-06-18 18:26:15 +00:00
Owen Anderson
68f6598c69
Insert a SmartMutex templated class into the class hierarchy, which takes a template parameter specifying whether this mutex
...
should become a no-op when not running in multithreaded mode. Make sys::Mutex a typedef of SmartMutex<false>, to preserve source compatibility.
llvm-svn: 73709
2009-06-18 17:53:17 +00:00
Owen Anderson
7d42b95b6c
Move Threading.[h|cpp] from Support to System.
...
llvm-svn: 73707
2009-06-18 16:54:52 +00:00
Dan Gohman
a0348809b6
Remove the code from IVUsers that attempted to handle
...
casted induction variables in cases where the cast
isn't foldable. It ended up being a pessimization in
many cases. This could be fixed, but it would require
a bunch of complicated code in IVUsers' clients. The
advantages of this approach aren't visible enough to
justify it at this time.
llvm-svn: 73706
2009-06-18 16:54:06 +00:00
Anton Korobeynikov
e2ff9a6f38
Forgot to commit this hunk
...
llvm-svn: 73693
2009-06-18 08:30:57 +00:00
Anton Korobeynikov
832b9e6a7a
Propagate calling conv for invokes too
...
llvm-svn: 73692
2009-06-18 08:13:56 +00:00
Chris Lattner
8527e674ce
Don't use int8_t, that requires DataTypes.h
...
llvm-svn: 73682
2009-06-18 04:56:53 +00:00
Zhongxing Xu
bb4a7979b5
include header for uint8_t.
...
llvm-svn: 73675
2009-06-18 04:11:43 +00:00
Evan Cheng
0e79603588
- Update register allocation hint after coalescing. This is done by the target since the hint is target dependent. This is important for ARM register pair hints.
...
- Register allocator should resolve the second part of the hint (register number) before passing it to the target since it knows virtual register to physical register mapping.
- More fixes to get ARM load / store double word working.
llvm-svn: 73671
2009-06-18 02:04:01 +00:00
Owen Anderson
ed14e767e8
Reapply r73647 in a non-broken form.
...
llvm-svn: 73662
2009-06-17 23:49:06 +00:00
Owen Anderson
aab59c52cf
Protect the GC table in Function.cpp
...
llvm-svn: 73647
2009-06-17 22:23:31 +00:00
Anton Korobeynikov
603a0b7a09
Honour calling convention and attributes of Callee by default.
...
llvm-svn: 73646
2009-06-17 22:20:46 +00:00
Lang Hames
16cab1935e
VNInfo cleanup.
...
llvm-svn: 73634
2009-06-17 21:01:20 +00:00
Owen Anderson
65c5cd728e
Add an RAII ScopedWriter, which allows one to acquire a writer lock for the duration of a scope. Simplify a lot of uses of
...
writer locks in Constants.cpp by using it.
llvm-svn: 73630
2009-06-17 20:34:43 +00:00
Douglas Gregor
3def847551
Define LLVM_NATIVE_ARCH in CMake, so that lli can actually JIT
...
llvm-svn: 73616
2009-06-17 17:01:56 +00:00
Chris Lattner
f44da17824
remove two headers subsumed by TargetSelect.h
...
llvm-svn: 73612
2009-06-17 16:45:02 +00:00
Chris Lattner
e57ab8dbd0
Add a utility header that makes it easy to link in the right set
...
of targets for various purposes.
llvm-svn: 73610
2009-06-17 16:42:01 +00:00
Chris Lattner
e60ff6702a
make CreateFMul forward to CreateFMul, not CreateMul.
...
llvm-svn: 73603
2009-06-17 06:31:02 +00:00
Mikhail Glushenkov
b697c774fe
Fix comment.
...
llvm-svn: 73601
2009-06-17 03:10:10 +00:00
Douglas Gregor
43613a2b0a
Update auto-generated configuration files
...
llvm-svn: 73591
2009-06-17 00:43:20 +00:00
Owen Anderson
82b58a843b
Use atomic increment/decrement for reference counting of Type's.
...
llvm-svn: 73588
2009-06-17 00:28:49 +00:00
Owen Anderson
8d0fe6f0d7
Add an atomic increment and decrement implementation, which will be used for
...
thread-safe reference counting.
llvm-svn: 73587
2009-06-17 00:13:00 +00:00
Owen Anderson
e4ed45924a
Forgot this file in my last commit.
...
llvm-svn: 73578
2009-06-16 22:56:04 +00:00
Owen Anderson
8a1ff9eb41
Fix #include guards.
...
llvm-svn: 73548
2009-06-16 20:26:04 +00:00
Owen Anderson
372a9289a5
Fix/cleanup trailing newlines.
...
llvm-svn: 73546
2009-06-16 20:23:05 +00:00
Owen Anderson
324f94c317
Add a portable wrapper for reader-writer locks.
...
llvm-svn: 73545
2009-06-16 20:19:28 +00:00
Douglas Gregor
1b731d5dbe
Introduce new headers whose inclusion forces linking and
...
initialization of all targets (InitializeAllTargets.h) or assembler
printers (InitializeAllAsmPrinters.h). This is a step toward the
elimination of relinked object files, so that we can build normal
archives.
llvm-svn: 73543
2009-06-16 20:12:29 +00:00
Anton Korobeynikov
a8fd40b50a
Address review comments: add 3 ARM calling conventions.
...
Dispatch C calling conv. to one of these conventions based on
target triple and subtarget features.
llvm-svn: 73530
2009-06-16 18:50:49 +00:00
Owen Anderson
a149e22c09
Add a configure check for pthread_rwlock_init.
...
llvm-svn: 73523
2009-06-16 18:20:20 +00:00
Owen Anderson
4cb4b6191a
Split the thread-related APIs out into their own file, and add a few more
...
calls for convenience.
llvm-svn: 73512
2009-06-16 17:33:51 +00:00
Chris Lattner
945d08d76f
Generalize instcombine's isSafeToLoadUnconditionally() function
...
to ignore readonly calls, and factor it out of instcombine so
that it can be used by other passes. Patch by Frits van Bommel!
llvm-svn: 73506
2009-06-16 17:23:12 +00:00
Sanjiv Gupta
bce3ca6ad9
Fixed names of libcalls checked in r73480.
...
llvm-svn: 73483
2009-06-16 10:22:58 +00:00
Sanjiv Gupta
557ed09e0f
Added required libcalls for PIC16 (mostly floating points to integer casting operations).
...
llvm-svn: 73480
2009-06-16 09:03:58 +00:00
Dan Gohman
22d4cf60d8
Add comments to ConstantInt::get and ConstantFP::get to more fully
...
describe their behavior.
llvm-svn: 73454
2009-06-16 01:02:32 +00:00
Owen Anderson
e2432761f0
Owen Anderson 2009-06-15: Use a SmallPtrSet here, for speed and to match df_iterator.
...
Owen Anderson 2009-06-15: Remember to clear out our maps to prevent crashing.
llvm-svn: 73438
2009-06-15 22:54:48 +00:00
Dan Gohman
0274d32530
Add a CreateFNeg function to IRBuilder.
...
llvm-svn: 73437
2009-06-15 22:50:40 +00:00
Dan Gohman
7ccc52f131
Support vector casts in more places, fixing a variety of assertion
...
failures.
To support this, add some utility functions to Type to help support
vector/scalar-independent code. Change ConstantInt::get and
ConstantFP::get to support vector types, and add an overload to
ConstantInt::get that uses a static IntegerType type, for
convenience.
Introduce a new getConstant method for ScalarEvolution, to simplify
common use cases.
llvm-svn: 73431
2009-06-15 22:12:54 +00:00
Anton Korobeynikov
eb68408a5a
Address more comments :)
...
llvm-svn: 73430
2009-06-15 22:08:48 +00:00
Anton Korobeynikov
6aba5c6fae
Document ABIType enum. Patch by Sandeep Patel!
...
llvm-svn: 73427
2009-06-15 21:46:02 +00:00
Evan Cheng
1283c6a066
Part 1.
...
- Change register allocation hint to a pair of unsigned integers. The hint type is zero (which means prefer the register specified as second part of the pair) or entirely target dependent.
- Allow targets to specify alternative register allocation orders based on allocation hint.
Part 2.
- Use the register allocation hint system to implement more aggressive load / store multiple formation.
- Aggressively form LDRD / STRD. These are formed *before* register allocation. It has to be done this way to shorten live interval of base and offset registers. e.g.
v1025 = LDR v1024, 0
v1026 = LDR v1024, 0
=>
v1025,v1026 = LDRD v1024, 0
If this transformation isn't done before allocation, v1024 will overlap v1025 which means it more difficult to allocate a register pair.
- Even with the register allocation hint, it may not be possible to get the desired allocation. In that case, the post-allocation load / store multiple pass must fix the ldrd / strd instructions. They can either become ldm / stm instructions or back to a pair of ldr / str instructions.
This is work in progress, not yet enabled.
llvm-svn: 73381
2009-06-15 08:28:29 +00:00
Chris Lattner
3f556daa6e
add a new static method to portably determine whether a patch is
...
absolute or not, based on a patch by Gregory Curfman!
llvm-svn: 73368
2009-06-15 04:17:07 +00:00
Dan Gohman
4fe64deb7b
Fix old-style type names in comments.
...
llvm-svn: 73362
2009-06-14 23:30:43 +00:00
Dan Gohman
8448acc8ba
Specialize DenseMapInfo for SCEVHandle, so that SCEVHandles can be
...
used as keys in DenseMaps.
llvm-svn: 73360
2009-06-14 22:55:07 +00:00
Dan Gohman
0652fd59ff
Convert several parts of the ScalarEvolution framework to use
...
SmallVector instead of std::vector.
llvm-svn: 73357
2009-06-14 22:47:23 +00:00
Evan Cheng
085caf10be
Move register allocation preference (or hint) from LiveInterval to MachineRegisterInfo. This allows more passes to set them.
...
llvm-svn: 73346
2009-06-14 20:22:55 +00:00
Owen Anderson
2f82e2735a
Add an early implementation of a partial inlining pass. The idea behind this
...
is that, for functions whose bodies are entirely guarded by an if-statement, it
can be profitable to pull the test out of the callee and into the caller.
This code has had some cursory testing, but still has a number of known issues
on the LLVM test suite.
llvm-svn: 73338
2009-06-14 08:26:32 +00:00
Bruno Cardoso Lopes
2f55027012
Introduce new BinaryObject (blob) class, ELF Writer modified to use it. BinaryObject.h by Aaron Gray
...
llvm-svn: 73333
2009-06-14 07:53:21 +00:00
Dan Gohman
8db2edcf7f
Add a ScalarEvolution::getAnyExtendExpr utility function for performing
...
extension with unspecified bits.
llvm-svn: 73293
2009-06-13 15:56:47 +00:00
Bruno Cardoso Lopes
77444cba6d
Type change cleanup on JCE and MCE. Patch by Aaron Gray
...
llvm-svn: 73271
2009-06-12 23:51:56 +00:00