1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

8767 Commits

Author SHA1 Message Date
Bill Wendling
067eae128b Add include file to get the type for in64_t.
llvm-svn: 73991
2009-06-23 20:02:00 +00:00
Chris Lattner
196bfd3908 add a simple MCImm class.
llvm-svn: 73984
2009-06-23 18:58:00 +00:00
Owen Anderson
c2d02066d0 Atomic ops that do arithmetic use signed arithmetic.
llvm-svn: 73980
2009-06-23 18:30:27 +00:00
Owen Anderson
27a85303fe Actually, these need to be signed integers, not unsigned.
llvm-svn: 73978
2009-06-23 18:21:13 +00:00
Owen Anderson
7b3570b242 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
1bea9b9158 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
2b8ea5e0c8 add an accessor.
llvm-svn: 73966
2009-06-23 17:50:34 +00:00
Owen Anderson
e0ff9fb130 Add an atomic add operation.
llvm-svn: 73964
2009-06-23 17:39:31 +00:00
Douglas Gregor
674c7a4c20 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
0cab9cae36 Revert r73923, which broke clang.
llvm-svn: 73957
2009-06-23 16:36:10 +00:00
Owen Anderson
f00516f54d Add guards around timer groups, which can be shared.
llvm-svn: 73923
2009-06-22 23:37:06 +00:00
Bob Wilson
6db76aaf10 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
422b2c613b 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
c023151c9f SCEVHandle is no more!
llvm-svn: 73906
2009-06-22 21:39:50 +00:00
Bruno Cardoso Lopes
7b196ba30e 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
83b6bbdcb4 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
cc245913e3 Add a getUMinFromMismatchedTypes helper function.
llvm-svn: 73883
2009-06-22 15:03:27 +00:00
Dan Gohman
d65752db50 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
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
Owen Anderson
3637fc65bd Use atomic increment/decrement for reference counting of Type's.
llvm-svn: 73588
2009-06-17 00:28:49 +00:00
Owen Anderson
430f18d2db 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
3974972558 Forgot this file in my last commit.
llvm-svn: 73578
2009-06-16 22:56:04 +00:00
Owen Anderson
c52c99f111 Fix #include guards.
llvm-svn: 73548
2009-06-16 20:26:04 +00:00
Owen Anderson
30a1b2528a Fix/cleanup trailing newlines.
llvm-svn: 73546
2009-06-16 20:23:05 +00:00
Owen Anderson
48d53f2c53 Add a portable wrapper for reader-writer locks.
llvm-svn: 73545
2009-06-16 20:19:28 +00:00
Douglas Gregor
f5291553f2 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
cc8d0058e2 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
8a07791070 Add a configure check for pthread_rwlock_init.
llvm-svn: 73523
2009-06-16 18:20:20 +00:00
Owen Anderson
b7cdd1a395 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
574c5de9f8 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
30e21aabcb Fixed names of libcalls checked in r73480.
llvm-svn: 73483
2009-06-16 10:22:58 +00:00
Sanjiv Gupta
00e60c0154 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
b501e5ddbd 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
3234d9d040 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
cccda40191 Add a CreateFNeg function to IRBuilder.
llvm-svn: 73437
2009-06-15 22:50:40 +00:00
Dan Gohman
2e737ac21f 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
536048774c Address more comments :)
llvm-svn: 73430
2009-06-15 22:08:48 +00:00
Anton Korobeynikov
f734bdb5df Document ABIType enum. Patch by Sandeep Patel!
llvm-svn: 73427
2009-06-15 21:46:02 +00:00
Evan Cheng
3219c7fbe5 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
dfaaf63aff 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
111f127d23 Fix old-style type names in comments.
llvm-svn: 73362
2009-06-14 23:30:43 +00:00
Dan Gohman
dda7e316db 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
d895ed43c8 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
1607bd1fa9 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
6aa3d83630 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
d73d79eaf9 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
25827fdc12 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
9cb41aaf57 Type change cleanup on JCE and MCE. Patch by Aaron Gray
llvm-svn: 73271
2009-06-12 23:51:56 +00:00
Bruno Cardoso Lopes
2b429fb48f Use forward declarations and move TargetELFWriterInfo impl to a new file.
llvm-svn: 73209
2009-06-11 22:13:00 +00:00
Bill Wendling
038b8dd7b5 Remove unused parameter warnings.
llvm-svn: 73202
2009-06-11 20:10:02 +00:00
Bruno Cardoso Lopes
9b68e8653f Support for ELF Visibility
Emission for globals, using the correct data sections
Function alignment can be computed for each target using TargetELFWriterInfo
Some small fixes

llvm-svn: 73201
2009-06-11 19:16:03 +00:00