Dan Gohman
db7860aa40
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
eb0a67278b
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
dd95ab3ca9
rename SourceMgr::PrintError to PrintMessage.
...
llvm-svn: 73861
2009-06-21 21:22:11 +00:00
Chris Lattner
c865ea76a6
move include searching logic from TGLexer to SourceMgr.
...
llvm-svn: 73845
2009-06-21 05:06:04 +00:00
Chris Lattner
5b9a2d79c0
Rename TGSourceMgr -> SourceMgr.
...
llvm-svn: 73844
2009-06-21 03:41:50 +00:00
Chris Lattner
4ff2620742
rename TGLoc -> SMLoc.
...
llvm-svn: 73843
2009-06-21 03:39:35 +00:00
Chris Lattner
4ed87b8790
move TGSourceMgr class out of TableGen into libsupport.
...
llvm-svn: 73842
2009-06-21 03:36:54 +00:00
Chris Lattner
a01650186d
fit in 80 cols
...
llvm-svn: 73838
2009-06-21 01:52:00 +00:00
Chris Lattner
7b43ca847d
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
fba2cdee3d
make immediates be int64_t like machineoperand. Add some apis
...
llvm-svn: 73809
2009-06-20 00:47:37 +00:00
Owen Anderson
b66d0add26
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
733fa621f6
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
2e95d43f24
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
d3c3963eea
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
295610c408
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
e2b1c9a530
mv CodeGen/DebugLoc.h Support/DebugLoc.h
...
llvm-svn: 73786
2009-06-19 22:08:58 +00:00
Owen Anderson
64a3af667e
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
c0ba371831
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
30dcb8401d
Add support for AuroraUX. Patch by evocallaghan.
...
llvm-svn: 73766
2009-06-19 14:40:01 +00:00
Lang Hames
1bade5ff09
More VNInfo tweaking, plus a little progress on intra-block splitting.
...
llvm-svn: 73750
2009-06-19 02:17:53 +00:00
Zhongxing Xu
d290ff9411
Include DataTypes.h for 'uint64_t'.
...
llvm-svn: 73748
2009-06-19 01:56:53 +00:00
Owen Anderson
5fa89d2f8d
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
3624754e23
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
c2b0fd0304
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
6cd267dcc5
move mangler quote handling from asm printers to TargetAsmInfo.
...
llvm-svn: 73738
2009-06-18 23:41:35 +00:00
Chris Lattner
ea0ea2f4bc
simplify macro debug info directive handling.
...
llvm-svn: 73736
2009-06-18 23:31:37 +00:00
Owen Anderson
99dc404fc5
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
b7742c5035
Add a SmartScopedLock, and use it to simplify code.
...
llvm-svn: 73722
2009-06-18 20:51:00 +00:00
Anton Korobeynikov
fed9dcc88c
Revert IRBuilder CC propagation. Fix SimplifyLibCalls instead.
...
llvm-svn: 73715
2009-06-18 20:05:31 +00:00
Owen Anderson
a1d2310ac7
Simplify the SmartMutex implementation a bit.
...
llvm-svn: 73711
2009-06-18 18:29:03 +00:00
Owen Anderson
4760da0a7a
Give RWMutex the SmartRWMutex treatment too.
...
llvm-svn: 73710
2009-06-18 18:26:15 +00:00
Owen Anderson
9aaa6b8958
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
a59f91c08d
Move Threading.[h|cpp] from Support to System.
...
llvm-svn: 73707
2009-06-18 16:54:52 +00:00
Dan Gohman
fd857b0406
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
82ab724191
Forgot to commit this hunk
...
llvm-svn: 73693
2009-06-18 08:30:57 +00:00
Anton Korobeynikov
e492bc7546
Propagate calling conv for invokes too
...
llvm-svn: 73692
2009-06-18 08:13:56 +00:00
Chris Lattner
47e29d1422
Don't use int8_t, that requires DataTypes.h
...
llvm-svn: 73682
2009-06-18 04:56:53 +00:00
Zhongxing Xu
8b992b2a97
include header for uint8_t.
...
llvm-svn: 73675
2009-06-18 04:11:43 +00:00
Evan Cheng
82a8ab8a8e
- 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
00e7ebbc38
Reapply r73647 in a non-broken form.
...
llvm-svn: 73662
2009-06-17 23:49:06 +00:00
Owen Anderson
0e2a78e820
Protect the GC table in Function.cpp
...
llvm-svn: 73647
2009-06-17 22:23:31 +00:00
Anton Korobeynikov
77a0bd41fc
Honour calling convention and attributes of Callee by default.
...
llvm-svn: 73646
2009-06-17 22:20:46 +00:00
Lang Hames
5c64015a56
VNInfo cleanup.
...
llvm-svn: 73634
2009-06-17 21:01:20 +00:00
Owen Anderson
f8776799ec
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
f3f924bfb6
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
213e8cbce7
remove two headers subsumed by TargetSelect.h
...
llvm-svn: 73612
2009-06-17 16:45:02 +00:00
Chris Lattner
21f6855b00
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
ee538a1431
make CreateFMul forward to CreateFMul, not CreateMul.
...
llvm-svn: 73603
2009-06-17 06:31:02 +00:00
Mikhail Glushenkov
dd69113516
Fix comment.
...
llvm-svn: 73601
2009-06-17 03:10:10 +00:00
Douglas Gregor
3e9d15410b
Update auto-generated configuration files
...
llvm-svn: 73591
2009-06-17 00:43:20 +00:00