Commit Graph

7508 Commits

Author SHA1 Message Date
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
Mon P Wang
c4d1021ead Added MemIntrinsicNode which is useful to represent target intrinsics that
touches memory and need an associated MemOperand


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57712 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 18:22:58 +00:00
Chris Lattner
6bdcda3d3e Keep track of *which* input constraint matches an output
constraint.  Reject asms where an output has multiple
input constraints tied to it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57687 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 16:47:46 +00:00
Chris Lattner
58f15c482a add an assert so that PR2356 explodes instead of running off an
array.  Improve some minor comments, refactor some helpers in
AsmOperandInfo.  No functionality change for valid code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57686 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 16:21:11 +00:00
Gabor Greif
4fbed982fb Add comment on how tagged pointers are
distinguished from normal (untagged) ones
as per review comment.

I am sufficiently unaquainted with doxygen to
defer the markup to someone with more experience.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57676 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 08:31:36 +00:00
Dan Gohman
f522068412 Trim #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57649 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 20:18:31 +00:00
Gabor Greif
023f84ecaf Introduce a typing refinenement on tagged data
using the 'volatile' qualifier. This should not have any operational consequences
on code, because tags should always be stripped off (giving a non-volatile pointer)
before dereferencing. The new qualification is there to catch some attempts to use
tagged pointers in a context where an untagged pointer is appropriate.

Notably this approach does not catch dereferencing of tagged pointers, but helps
in separating the two concepts a bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57641 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 15:33:02 +00:00
Dan Gohman
8e8b8a223c Const-ify several TargetInstrInfo methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57622 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 01:49:15 +00:00
Zhongxing Xu
1a26daa9c3 Fix a calculation error in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57619 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 01:21:44 +00:00
Dan Gohman
7ddcadc7ee Move the include of MachineLocation.h into MachineModuleInfo.h
because it declares a std::vector<MachineMove>, and strict
concept checking requires the definition of MachineMove to be
available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57617 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 00:20:14 +00:00
Dan Gohman
254a886057 Implement a SmallVector insert method that can insert multiple
copies of a value, and add several additional utilities to make
SmallVector better conform to the Container concept.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57616 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 00:15:24 +00:00
Dan Gohman
3d4227bec5 Fix several places that called mapped_iterator's constructor without
passing in a function object.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57615 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 00:12:39 +00:00
Dan Gohman
95c2cc51eb Correct the name of isTrapping in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57606 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 22:56:21 +00:00
Dan Gohman
65ac2fa880 Fix whitespace in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57605 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 22:55:03 +00:00
Chris Lattner
a870039277 Fix PR2115 by doxygenating Use more, and make some more methods private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57587 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 16:56:14 +00:00
Gabor Greif
7d50031e17 remove legacy interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57569 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 09:52:56 +00:00
Mon P Wang
607ec1f608 Removed pinsrd and pinsrq intrinsics because the code generator does not support
them since they map to insert element


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57564 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 06:27:16 +00:00
Evan Cheng
7f04268176 - Add target lowering hooks that specify which setcc conditions are illegal,
i.e. conditions that cannot be checked with a single instruction. For example,
SETONE and SETUEQ on x86.
- Teach legalizer to implement *illegal* setcc as a and / or of a number of
legal setcc nodes. For now, only implement FP conditions. e.g. SETONE is
implemented as SETO & SETNE, SETUEQ is SETUO | SETEQ.
- Move x86 target over.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57542 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 02:05:31 +00:00
Dan Gohman
dd5b58ad7b FastISel support for exception-handling constructs.
- Move the EH landing-pad code and adjust it so that it works
   with FastISel as well as with SDISel.
 - Add FastISel support for @llvm.eh.exception and
   @llvm.eh.selector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57539 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 23:54:11 +00:00
Daniel Dunbar
c9debfbf06 Add llvm::hexdigit to StringExtras (number -> hexadecimal char)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57536 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 23:26:20 +00:00
Evan Cheng
0329466b6b Rename LoadX to LoadExt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57526 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 21:26:46 +00:00
Devang Patel
f5ff0cf03a Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57522 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 20:30:54 +00:00
Evan Cheng
a6548d0f29 Clarify meaning of copyRegToReg's return value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57449 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 17:30:56 +00:00
Gabor Greif
63e0669b8e fix typo's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57435 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 10:28:12 +00:00
Gabor Greif
c9f7ef7e7a remove a deprecated internal interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57434 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 10:25:27 +00:00
Chris Lattner
75d53d6bd0 this was to be removed after 2.4 branched.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57422 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-12 18:57:09 +00:00
Owen Anderson
4b089929b4 Make Escape Analysis work for any pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57412 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-12 07:33:29 +00:00
Owen Anderson
36b708a318 Add EscapeAnalysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57411 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-12 06:49:21 +00:00