Commit Graph

7535 Commits

Author SHA1 Message Date
Dan Gohman
f4717aa1b2 Add some more information to the top-level comment for this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58339 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 18:47:37 +00:00
Jim Grosbach
bc6d876adf Support for constant islands in the ARM JIT.
Since the ARM constant pool handling supercedes the standard LLVM constant
pool entirely, the JIT emitter does not allocate space for the constants,
nor initialize the memory. The constant pool is considered part of the 
instruction stream.

Likewise, when resolving relocations into the constant pool, a hook into
the target back end is used to resolve from the constant ID# to the
address where the constant is stored.

For now, the support in the ARM emitter is limited to 32-bit integer. Future
patches will expand this to the full range of constants necessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58338 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 18:25:49 +00:00
Evan Cheng
83f5c856d9 Avoid calls to setSubgraphColor in release mode. They generate lots of error messages and slow down compilation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58336 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 17:23:13 +00:00
Tanya Lattner
803f5fc02f Do not allow a user to set the operand for a constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58335 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 17:22:40 +00:00
Chris Lattner
0fed8bf91f fit in 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58318 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 06:20:17 +00:00
Chris Lattner
b3696d865e more comment cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58316 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 05:32:08 +00:00
Chris Lattner
b2ccf8f607 comment cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58315 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 05:31:31 +00:00
Dan Gohman
5a9a4bf7f2 Fix the name of the include guard to match the filename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58310 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 00:52:46 +00:00
David Greene
8ad4c00c00 Have TableGen emit setSubgraphColor calls under control of a -gen-debug
flag.  Then in a debugger developers can set breakpoints at these calls
to see waht is about to be selected and what the resulting subgraph
looks like.  This really helps when debugging instruction selection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58278 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27 21:56:29 +00:00
Daniel Dunbar
9a40d3361a Return bool (inserted) from StringSet::insert as for StringMap::insert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58268 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27 20:50:02 +00:00
David Greene
c5e7e8d87d Add setSubgraphColor to color an entire portion of a SelectionDAG. This
will be used to support debug features in TableGen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58257 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27 18:17:03 +00:00
David Greene
13e781ebe7 Add STL-style typedefs and default constructors to make it possible to
use DenseMap in more contexts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58256 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27 18:15:15 +00:00
Torok Edwin
3d54502304 export an ID for the instructionNamer, allowing analysis/transformation passes
that need it to require it by ID.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58238 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27 10:16:27 +00:00
Evan Cheng
23066288fd For now, don't split live intervals around x87 stack register barriers. FpGET_ST0_80 must be right after a call instruction (and ADJCALLSTACKUP) so we need to find a way to prevent reload of x87 registers between them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58230 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27 07:14:50 +00:00
Oscar Fuentes
ac1cfa09d7 Return something (i.e. NULL) from an unimplemented virtual function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58183 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26 04:26:33 +00:00
Oscar Fuentes
579e43a44a CMake: GetTargetTriple: new module for determining the target
triple. Assign to LLVM_HOSTTRIPLE so it figures in config.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58176 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26 00:47:52 +00:00
Evan Cheng
95a3f0d99e Add storeRegTo{StackSlot|Addr} and loadRegFrom{StackSlot|Addr} descriptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58164 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25 23:08:22 +00:00
Dan Gohman
5d9759bd04 Make comments and code for QuietWarnings and QuietErrors
actually correspond to what their names suggest.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58146 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25 17:57:20 +00:00
Nicolas Geoffray
46fa139e26 Support for allocation of TLS variables in the JIT. Allocation of a global
variable is moved to the execution engine. The JIT calls the TargetJITInfo
to allocate thread local storage. Currently, only linux/x86 knows how to
allocate thread local global variables.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58142 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25 15:41:43 +00:00
Oscar Fuentes
de98db33fb CMake: MSVC++ no longer uses a special configuration method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58132 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25 03:29:36 +00:00
Oscar Fuentes
cd6213233e CMake: Sync'ed DataTypes.h.cmake with DataTypes.h.in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58131 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25 03:25:11 +00:00
Evan Cheng
06587497dc Avoid splitting an interval multiple times; avoid splitting re-materializable val# (for now).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58068 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 02:05:00 +00:00
Dan Gohman
c9f3cc3bda Fix constant-offset emission for x86-64 absolute addresses. This
fixes a bunch of test-suite JIT failures on x86-64 in
-relocation-model=static mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58066 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 01:57:54 +00:00
Ted Kremenek
43d1f02b54 Added raw_fd_ostream::close().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58052 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 23:49:09 +00:00
Steve Naroff
93fbe75a94 Changes to make the Windows build work...
- Add a file to the VC++ project.
- Make sure the clang driver links against the Transforms library.
- Incorporate changes from patch by Dan Gohman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58048 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 23:28:23 +00:00
Evan Cheng
f5cd4f0d70 Committing a good chunk of the pre-register allocation live interval splitting pass. It's handling simple cases and appear to do good things. Next: avoid splitting an interval multiple times; renumber registers when possible; record stack slot live intervals for coloring; rematerialize defs when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58044 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 20:43:13 +00:00
Argyrios Kyrtzidis
39ac2cbcd8 Introduce INT64_C macro and unbreak LLVM on MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58039 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 17:20:39 +00:00
Daniel Dunbar
394f0441e0 Change create*Pass factory functions to return Pass* instead of
LoopPass*.
 - Although less precise, this means they can be used in clients
   without RTTI (who would otherwise need to include LoopPass.h, which
   eventually includes things using dynamic_cast). This was the
   simplest solution that presented itself, but I am happy to use a
   better one if available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58010 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 23:32:42 +00:00
Ted Kremenek
30f100e140 Fix incorrect testing for the end of the both strings in CStrInCStrNoCase. This could cause a read-out-of-bounds error if s2 is smaller than s1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58009 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 23:16:52 +00:00
Daniel Dunbar
d1ce3b48e2 Add raw_ostream versions of WriteBitcodeToFile and BitcodeWriterPass.
- The old versions are still hanging around, but should be migrated
   away from.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57989 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 17:39:14 +00:00
Duncan Sands
3b521d5acc Add some comments explaining the meaning of a boolean
that is not of type MVT::i1 in SELECT and SETCC nodes.
Relax the LegalizeTypes SELECT condition promotion
sanity checks to allow other condition types than i1.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57966 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 09:06:24 +00:00
Daniel Dunbar
3b0da26e20 Move Print*Pass to use raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57946 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 03:25:22 +00:00
Bill Wendling
b2ab0e7471 Fix comment to name "TokenFactor" instead of "Token factor".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57939 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 23:57:52 +00:00
Daniel Dunbar
f4db3a51c7 Privatize PrintModulePass and PrintFunctionPass and add
createPrintModulePass and createPrintFunctionPass.
 - So clients who compile w/o RTTI can use them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57933 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 23:33:38 +00:00
Daniel Dunbar
48534b31d8 Clear raw_fd_ostream error string on success and explain behavior in
documentation.

Add C++ header marker.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57923 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 19:53:10 +00:00
Nuno Lopes
cef7527a85 fix a tricky bug in the JIT global variable emitter, that was triggered when JITing a variable independently of a function. This lead to sharing memory memory between functions and GVs thus changing the value of a GV could change the code in execution. more details on the ML.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57900 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 11:42:16 +00:00
Ted Kremenek
e06e91122f constify some methods and variables in ImmutableList.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57894 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 05:59:33 +00:00
Evan Cheng
09e8ca8a58 Add skeleton for the pre-register allocation live interval splitting pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57847 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-20 21:44:59 +00:00
Jim Grosbach
932a32d251 Update the stub and callback code to handle lazy compilation. The stub
is re-written by the callback to branch directly to the compiled code
in future invocations.

Added back in range-based memory permission functions for the updating of
the stub on Darwin.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57846 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-20 21:39:23 +00:00
Evan Cheng
11a26f3697 Add a register class -> virtual registers map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57844 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-20 20:03:28 +00:00
Evan Cheng
f89cfaea7a This forward declaration is unnecessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57843 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-20 20:02:17 +00:00
Duncan Sands
9a2c1d3c46 Teach getTypeToTransformTo to return something
sensible for vectors being scalarized.  Note
that this method can't return anything very
sensible when splitting non-power-of-two vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57839 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-20 16:24:25 +00:00
Dan Gohman
8c8b2a89f9 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57832 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-20 15:58:02 +00:00
Matthijs Kooijman
2bbeccdee1 Fix typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57829 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-20 11:24:57 +00:00
Matthijs Kooijman
1ad70c09c8 Remove another stale comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57828 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-20 11:23:18 +00:00
Matthijs Kooijman
854255361e Remove an inappropriate (probably outdated) comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57827 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-20 11:21:12 +00:00
Mon P Wang
4ae14bc1f5 Make llvm memory barrier available as an intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57750 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-18 02:48:13 +00:00
Dan Gohman
6520e20e4f Teach DAGCombine to fold constant offsets into GlobalAddress nodes,
and add a TargetLowering hook for it to use to determine when this
is legal (i.e. not in PIC mode, etc.)

This allows instruction selection to emit folded constant offsets
in more cases, such as the included testcase, eliminating the need
for explicit arithmetic instructions.

This eliminates the need for the C++ code in X86ISelDAGToDAG.cpp
that attempted to achieve the same effect, but wasn't as effective.

Also, fix handling of offsets in GlobalAddressSDNodes in several
places, including changing GlobalAddressSDNode's offset from
int to int64_t.

The Mips, Alpha, Sparc, and CellSPU targets appear to be
unaware of GlobalAddress offsets currently, so set the hook to
false on those targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57748 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-18 02:06:02 +00:00
Dan Gohman
fbee0f6377 Use the opcode predicates, instead of duplicating the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57735 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 21:42:45 +00:00
Evan Cheng
b89be6150a Add RCBarriers to TargetInstrDesc. It's a list of register classes the given instruction can "clobber". For example, on x86 the call instruction can modify all of the XMM and fp stack registers.
TableGen has been taught to generate the lists from instruction definitions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57722 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 21:00:09 +00:00