Commit Graph

14541 Commits

Author SHA1 Message Date
Nadav Rotem
20a05be15e Address Duncan's CR request:
1. Cleanup the tests in ConstantFolding.cpp
2. Implement isAllOnes for Constant, ConstantFP, ConstantVector





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138340 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-23 17:48:43 +00:00
Ivan Krasin
38fb2db6c9 This patch adds support of le32 pseudo-cpu that stands for generic
32-bit little-endian CPU. Used by PNaCl and Emscripten.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138335 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-23 16:59:00 +00:00
Benjamin Kramer
6667e54296 Add an MCInstrAnalysis version of isCall.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138305 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-22 23:41:41 +00:00
Jay Foad
ff7782bcc9 Remove DEFINE_TRANSPARENT_CASTED_OPERAND_ACCESSORS, folding its
functionality into DEFINE_TRANSPARENT_OPERAND_ACCESSORS. A side-effect
of this is that the operand accessors for Constants will tolerate NULL
operands, fixing PR10663.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138230 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-22 09:37:03 +00:00
Devang Patel
93d39be530 Do not use named md nodes to track variables that are completely optimized. This does not scale while doing LTO with debug info. New approach is to include list of variables in the subprogram info directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138145 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-19 23:28:12 +00:00
Jakob Stoklund Olesen
cafe614035 Add IntervalMap::const_iterator::atBegin().
It returns true when operator--() can be called.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138107 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-19 22:04:19 +00:00
Bill Wendling
7e8840c4d9 Add SplitLandingPadPredecessors().
SplitLandingPadPredecessors is similar to SplitBlockPredecessors in that it
splits the current block and attaches a set of predecessors to the new basic
block. However, it differs from SplitBlockPredecessors in that it's specifically
designed to handle landing pad blocks.

Two new basic blocks are created: one that is has the vector of predecessors as
its predecessors and one that has the remaining predecessors as its
predecessors. Those two new blocks then receive a cloned copy of the landingpad
instruction from the original block. The landingpad instructions are joined in a
PHI, etc. Like SplitBlockPredecessors, it updates the LLVM IR, AliasAnalysis,
DominatorTree, DominanceFrontier, LoopInfo, and LCCSA analyses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138014 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-19 00:05:40 +00:00
Ivan Krasin
fb23462889 Add NativeClient operating system support.
This patch adds support of NativeClient (*-*-nacl) OS support to LLVM.
It's already supported in autoconf/config.sub.

The motivation for this change is to start upstreaming PNaCl work. The
whole set of patches include llvm backends (i686, x86_64, ARM),
llvm-gcc (probably, would not be upstreamed because it's deprecated)
and clang (the work has been just started, the amount of changes is
going to be low and the most of the work is expected to be done close
to the mainline).




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138005 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-18 22:54:21 +00:00
Ivan Krasin
74af88a666 FastISel: avoid function calls between the materialization of the constant and its use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137993 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-18 22:06:10 +00:00
Chris Lattner
489fee1b64 Rip out the old StructType APIs as warned about on llvmdev last week.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137953 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-18 17:39:28 +00:00
Richard Osborne
c4dcf323cc Add intrinsics for SETEV, GETED, GETET.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137938 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-18 13:00:48 +00:00
Bill Wendling
2ac0e6be05 Add the support in code-gen for the landingpad instruction lowering.
The landingpad instruction is lowered into the EXCEPTIONADDR and EHSELECTION
SDNodes. The information from the landingpad instruction is harvested by the
'AddLandingPadInfo' function. The new EH uses the current EH scheme in the
back-end. This will change once we switch over to the new scheme. (Reviewed by
Jakob!)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137880 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17 21:56:44 +00:00
Bill Wendling
c1dbf0cdb4 Remove unneeded sentence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137854 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17 19:33:27 +00:00
Jordy Rose
c68c8623d0 ...and make sure DynamicLibrary builds by removing "const" from the Invalid placeholder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137843 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17 18:28:14 +00:00
Jordy Rose
77b6f2fd22 Don't use NULL to represent an invalid library; Cygwin uses this for RTLD_DEFAULT. Caught by Takumi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137841 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17 18:23:17 +00:00
Owen Anderson
83e3f67fb6 Allow the MCDisassembler to return a "soft fail" status code, indicating an instruction that is disassemblable, but invalid. Only used for ARM UNPREDICTABLE instructions at the moment.
Patch by James Molloy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137830 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17 17:44:15 +00:00
Jordy Rose
0bce85fbfa Use DynamicLibrary instances as a way to get symbols from a specific library. Preparation for upcoming (preliminary) support for plugins for the static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137791 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17 00:29:32 +00:00
Devang Patel
94c7ddb6f5 Until now all debug info MDNodes referred to a root MDNode, a compile unit. This simplified handling of these needs in dwarf writer. However, one side effect of this is that during link time optimization all these MDNodes are _not_ uniqued. In other words there will be N number of MDNodes describing "int", "char" and all other types, which would suddenly grow when each object file starts using libraries like STL.
MDNodes graph structure such that compiler unit keeps track of important MDNodes and update dwarf writer to process mdnodes top-down instead of bottom up.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137778 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-16 22:09:43 +00:00
Devang Patel
d6a49773ff Increment debug info version to accommodate upcoming change in debug info node structure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137751 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-16 21:00:05 +00:00
Bill Wendling
d2e103daf8 Add getFirstInsertionPt() method.
getFirstInsertionPt() returns an iterator to the first insertion point in a
basic block. This is after all PHIs and any other instruction which is required
to be at the top of the basic block (like LandingPadInst).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137744 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-16 20:42:52 +00:00
Jim Grosbach
1b84cce77f Remove unused Target argument from AsmParser construction methods.
The argument is unused, and is a layering violation in any case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137735 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-16 18:33:49 +00:00
Jim Grosbach
ac29c0af3d Remove unused forward declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137734 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-16 18:31:36 +00:00
Jim Grosbach
0ba45d4fb3 Tidy up. Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137721 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-16 16:38:17 +00:00
David Chisnall
7a817eae6c Add a mechanism for optimisation plugins to register passes that all front ends can use without needing to be aware of the plugin (or the plugin be aware of the front end).
Before 3.0, I'd like to add a mechanism for automatically loading a set of plugins from a config file.  API suggestions welcome...



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137717 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-16 13:58:41 +00:00
Rafael Espindola
48c4c6807b Remove unimplemented method. Fixes PR10658.
Thanks to Jonas Gafele for noticing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137716 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-16 13:53:50 +00:00
Jim Grosbach
19cb7f491f MCTargetAsmParser target match predicate support.
Allow a target assembly parser to do context sensitive constraint checking
on a potential instruction match. This will be used, for example, to handle
Thumb2 IT block parsing.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137675 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-15 23:03:29 +00:00
Devang Patel
6326a4238d Add a finalize() hook, that'll let DIBuilder construct compile unit lazily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137673 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-15 23:00:00 +00:00
Jim Grosbach
47a24ab4d7 Move MatchResultTy enum into base class definition.
No need for it to be redefined as part of every derived target asm parser
class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137649 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-15 20:53:08 +00:00
Devang Patel
6f9d8ffe5e Refactor. Global variables are part of compile unit so let CompileUnit create new global variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137621 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-15 17:57:41 +00:00
Jim Grosbach
bb0752b040 Tidy up trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137619 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-15 17:30:25 +00:00
Nick Lewycky
53b2b73643 Remove the last improper use of getGlobalContext() from LLVM.
This caused a race condition where a thread calls ~LLVMContextImpl which calls
Module::dropAllReferences which calls begin() on an empty ilist that would
create the sentinel, which racily accesses the global context.

This can not be fixed by locking inside createSentinel because the lock would
need to be shared with all users of the global context, including those that
reside outside LLVM's own code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137546 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-13 01:04:44 +00:00
Bill Wendling
e6e8826870 Initial commit of the 'landingpad' instruction.
This implements the 'landingpad' instruction. It's used to indicate that a basic
block is a landing pad. There are several restrictions on its use (see
LangRef.html for more detail). These restrictions allow the exception handling
code to gather the information it needs in a much more sane way.

This patch has the definition, implementation, C interface, parsing, and bitcode
support in it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137501 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 20:24:12 +00:00
Devang Patel
92a36e6583 Constify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137489 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 18:18:02 +00:00
Devang Patel
cd9f6c53de Use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137485 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 18:10:19 +00:00
Chris Lattner
d95f8f6ada add ifdef's to let people easily remove these dead api for testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137483 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 18:08:19 +00:00
Chris Lattner
f4bbcaabeb add two missing function impls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137470 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 17:43:05 +00:00
Chris Lattner
2c38d65fd9 add new accessors to reflect new terminology in struct types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137468 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 17:31:02 +00:00
Duncan Sands
1f6a329f79 Silence a bunch (but not all) "variable written but not read" warnings
when building with assertions disabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137460 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 14:54:45 +00:00
Chris Lattner
823eb1ca11 Fix an obscure bug in PointerUnion that would bite PointerUnion3/4. Basically,
when checking isNull(), we'd pick off the sentinel bit for the outer 
PointerUnion, but would not recursively convert the inner pointerunion to bool,
so if *its* sentinel bit is set, isNull() would incorrectly return false.

No testcase, because someone hit this when they were trying to refactor code
to use PointerUnion3, but they since found a better solution.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137428 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 04:31:38 +00:00
NAKAMURA Takumi
1221139f10 include/llvm/Config/config.h.cmake: Reorder to follow config.h.in, and import stuff from llvm-config.h.cmake and clang/config.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137424 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 03:27:54 +00:00
NAKAMURA Takumi
8776fa44d4 CMake: Eliminate unused checks and #undef(s) as below;
STACK_DIRECTION
YYTEXT_POINTER
HAVE_NAMESPACES
HAVE_STD_ITERATOR
HAVE_FWD_ITERATOR
HAVE_BI_ITERATOR
HAVE_GLOBAL_HASH_MAP
HAVE_GLOBAL_HASH_SET
HAVE_GNU_EXT_HASH_MAP
HAVE_GNU_EXT_HASH_SET
HAVE_STD_EXT_HASH_MAP
HAVE_STD_EXT_HASH_SET

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137423 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 03:27:48 +00:00
NAKAMURA Takumi
b43b09eef5 include/llvm/Config/llvm-config.h: Reorder and reword to follow (generated) config.h.in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137413 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 01:50:50 +00:00
NAKAMURA Takumi
4362c6225e configure: Update since r136721.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137412 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 01:50:43 +00:00
Nick Lewycky
2fc75d5d60 A virtual destructor for the class with virtual methods!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137400 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 00:32:15 +00:00
Andrew Trick
b1831c6640 Allow loop unrolling to get known trip counts from ScalarEvolution.
SCEV unrolling can unroll loops with arbitrary induction variables. It
is a prerequisite for -disable-iv-rewrite performance. It is also
easily handles loops of arbitrary structure including multiple exits
and is generally more robust.

This is under a temporary option to avoid affecting default
behavior for the next couple of weeks. It is needed so that I can
checkin unit tests for updateUnloop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137384 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-11 23:36:16 +00:00
NAKAMURA Takumi
4c7324d032 DataTypes.h.cmake: Tweak INT32_MIN for MSVC. MSC treats -2147483648 as -(2147483648U).
It caused an unexpected behavior since r137254.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137365 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-11 21:59:55 +00:00
Chad Rosier
78eb93c591 Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137286 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-11 00:22:48 +00:00
Devang Patel
5bc942cc3c Stay within 80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137283 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-10 23:58:09 +00:00
Andrew Trick
fb62b8deb3 Reapplying r136844.
An algorithm for incrementally updating LoopInfo within a
LoopPassManager. The incremental update should be extremely cheap in
most cases and can be used in places where it's not feasible to
regenerate the entire loop forest.

- "Unloop" is a node in the loop tree whose last backedge has been removed.
- Perform reverse dataflow on the block inside Unloop to propagate the
  nearest loop from the block's successors.
- For reducible CFG, each block in unloop is visited exactly
  once. This is because unloop no longer has a backedge and blocks
  within subloops don't change parents.
- Immediate subloops are summarized by the nearest loop reachable from
  their exits or exits within nested subloops.
- At completion the unloop blocks each have a new parent loop, and
  each immediate subloop has a new parent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137276 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-10 23:22:57 +00:00
Andrew Trick
d8a2f3ab91 Cleanup. Remove an extraneous GraphTraits specialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137264 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-10 22:55:39 +00:00
Devang Patel
b549bcfe6c Distinguish between two copies of one inlined variable. Take 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137253 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-10 21:50:54 +00:00
Devang Patel
103b8e653c Provide utility to extract and use lexical scoping information from machine instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137237 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-10 19:04:06 +00:00
Andrew Trick
bddb7f8210 Cleanup. Make ScalarEvolution an explicit argument of the
SimplifyIndVar utility since it is required.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137202 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-10 04:22:26 +00:00
Andrew Trick
4b4bb71bcd Added a SimplifyIndVar utility to simplify induction variable users
based on ScalarEvolution without changing the induction variable phis.

This utility is the main tool of IndVarSimplifyPass, but the pass also
restructures induction variables in strange ways that are sensitive to
pass ordering. This provides a way for other loop passes to simplify
new uses of induction variables created during transformation. The
utility may be used by any pass that preserves ScalarEvolution. Soon
LoopUnroll will use it.

The net effect in this checkin is to cleanup the IndVarSimplify pass
by factoring out the SimplifyIndVar algorithm into a standalone utility.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137197 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-10 03:46:27 +00:00
Andrew Trick
2d31ae3d9d Cleanup. Added LoopBlocksDFS::perform for simple clients.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137195 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-10 01:59:05 +00:00
Peter Collingbourne
59c1ba96ba Preserve the name for this variant of IRBuilder::CreateCall
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137192 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-10 01:10:08 +00:00
Andrew Trick
306afdf443 Cleanup. Avoid relying on specialization of std::distance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137191 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-10 00:49:12 +00:00
Andrew Trick
b1eede1281 Fix the LoopUnroller to handle nontrivial loops and partial unrolling.
These are not individual bug fixes. I had to rewrite a good chunk of
the unroller to make it sane. I think it was getting lucky on trivial
completely unrolled loops with no early exits. I included some fairly
simple unit tests for partial unrolling. I didn't do much stress
testing, so it may not be perfect, but should be usable now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137190 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-10 00:28:10 +00:00
Jakob Stoklund Olesen
c66d36028b Trim an unneeded header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137184 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-09 23:49:21 +00:00
Eli Friedman
21006d40ac Representation of 'atomic load' and 'atomic store' in IR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137170 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-09 23:02:53 +00:00
Jakob Stoklund Olesen
6d1fd0b979 Move CalculateRegClass to MRI::recomputeRegClass.
This function doesn't have anything to do with spill weights, and MRI
already has functions for manipulating the register class of a virtual
register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137123 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-09 16:46:27 +00:00
Devang Patel
48d726fbce Provide method to print variable's extended name which includes inline location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137095 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-09 01:03:14 +00:00
Jakob Stoklund Olesen
27215676c7 Refer to the RegisterCoalescer pass by ID.
A public interface is no longer needed since RegisterCoalescer is not an
analysis any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137082 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-09 00:29:53 +00:00
Jakob Stoklund Olesen
2df3f58a0b Hoist hasLoadFromStackSlot and hasStoreToStackSlot.
These the methods are target-independent since they simply scan the
memory operands.  They can live in TargetInstrInfoImpl.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137063 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-08 20:53:24 +00:00
Benjamin Kramer
08de97a5b0 Pacify virtual dtor warnings and cmake buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137060 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-08 19:09:02 +00:00
Benjamin Kramer
41ab14b725 Add MCInstrAnalysis class. This allows the targets to specify own versions of MCInstrDescs functions.
- Add overrides for ARM.
- Teach llvm-objdump to use this instead of plain MCInstrDesc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137059 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-08 18:56:44 +00:00
Chandler Carruth
4147f39769 Temporarily revert r135528 which distinguishes between two copies of one
inlined variable, based on the discussion in PR10542.

This explodes the runtime of several passes down the pipeline due to
a large number of "copies" remaining live across a large function. This
only shows up with both debug and opt, but when it does it creates
a many-minute compile when self-hosting LLVM+Clang. There are several
other cases that show these types of regressions.

All of this is tracked in PR10542, and progress is being made on fixing
the issue. Once its addressed, the re-instated, but until then this
restores the performance for self-hosting and other opt+debug builds.

Devang, let me know if this causes any trouble, or impedes fixing it in
any way, and thanks for working on this!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136953 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-05 00:51:31 +00:00
Duncan Sands
1203486d92 Fix a place that was clearly forgotten when the type legalization
logic moved over to its own enum.  Noticed by Andrey Karpov with
the PVS-studio tool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136881 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-04 16:01:54 +00:00
Andrew Trick
0712108d22 Reverting r136884 updateUnloop, which crashed a linux builder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136857 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-04 01:04:37 +00:00
Andrew Trick
762797d1af An algorithm for incrementally updating LoopInfo within a
LoopPassManager. The incremental update should be extremely cheap in
most cases and can be used in places where it's not feasible to
regenerate the entire loop forest.

- "Unloop" is a node in the loop tree whose last backedge has been removed.
- Perform reverse dataflow on the block inside Unloop to propagate the
  nearest loop from the block's successors.
- For reducible CFG, each block in unloop is visited exactly
  once. This is because unloop no longer has a backedge and blocks
  within subloops don't change parents.
- Immediate subloops are summarized by the nearest loop reachable from
  their exits or exits within nested subloops.
- At completion the unloop blocks each have a new parent loop, and
  each immediate subloop has a new parent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136844 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-03 23:50:25 +00:00
Andrew Trick
fbfb806e3f whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136840 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-03 23:43:49 +00:00
Andrew Trick
5207936a24 An interface for iterating over a loop's blocks in DFS order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136838 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-03 23:27:28 +00:00
Bill Wendling
2626dba9c5 Remove the LowerSetJmp pass. It wasn't used effectively by any of the targets.
This is some of my original LLVM code. *wipes tear*


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136821 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-03 22:18:20 +00:00
Owen Anderson
56cb3e3ccb Add accessors for manipulating an MCInst's operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136818 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-03 21:52:15 +00:00
Jakub Staszak
8ea45231dc Add more constantness in BlockFrequencyInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136816 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-03 21:30:57 +00:00
Eli Friedman
26689ac37e New approach to r136737: insert the necessary fences for atomic ops in platform-independent code, since a bunch of platforms (ARM, Mips, PPC, Alpha are the relevant targets here) need to do essentially the same thing.
I think this completes the basic CodeGen for atomicrmw and cmpxchg.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136813 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-03 21:06:02 +00:00
Bill Wendling
866ec86542 Remove CreateUnwind from the IRBuillder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136811 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-03 20:53:38 +00:00
Andrew Trick
1009c3299b SCEV: Use AssertingVH to catch dangling BasicBlock* when passes forget
to notify SCEV of a change. Add forgetLoop in a couple of those places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136797 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-03 18:32:11 +00:00
Jay Foad
e3fbe6c0fb Use cast<> instead of a C-style cast to get some free assertions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136771 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-03 10:05:04 +00:00
Rafael Espindola
c684e83e45 Move methods in PassManagerBuilder offline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136727 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02 21:50:27 +00:00
Rafael Espindola
3d453ac131 move PassManagerBuilder.h to IPO. This is a non intuitive place to put it,
but it solves a layering violation since things in Support are not supposed to
use things in Transforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136726 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02 21:50:24 +00:00
Rafael Espindola
49cb9b8886 Assume .cfi_startproc is the first thing in a function. If the function is
externally visable, create a local symbol to use in the CFE. If not, use the
function label itself.

Fixes PR10420.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136716 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02 20:24:22 +00:00
Roman Divacky
2c0d69fad0 Sketch out PowerPC ELF writer. This is enough to get clang -integrated-as
to compile a working hello world on FreeBSD/PPC32.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136689 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02 15:51:38 +00:00
Andrew Trick
fcb4356dee Use consistent terminology for loop exit/exiting blocks. Name change only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136677 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02 04:23:35 +00:00
Eli Friedman
9b0a479bb7 Fix a couple silly typos in IRBuilder in the new atomic instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136665 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02 00:45:35 +00:00
Owen Anderson
423b81e692 Add a clear() operation to MCInst, to drop all of its operands. Useful for the disassembler, where we may realize fairly late into decoding that something is wrong and need to reset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136634 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-01 18:43:18 +00:00
Jakub Staszak
e2481ff8ee Add BlockFrequency::getEntryFrequency()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136618 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-01 15:22:10 +00:00
Jay Foad
4f2d6950fb The operands of a GlobalAlias are always Constants. Simplify things
accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136608 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-01 12:20:36 +00:00
Bill Wendling
dccc03b242 Add the 'resume' instruction for the new EH rewrite.
This adds the 'resume' instruction class, IR parsing, and bitcode reading and
writing. The 'resume' instruction resumes propagation of an existing (in-flight)
exception whose unwinding was interrupted with a 'landingpad' instruction (to be
added later).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136589 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-31 06:30:59 +00:00
Bill Wendling
10c6d12a9f Revert r136253, r136263, r136269, r136313, r136325, r136326, r136329, r136338,
r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444,
r136445, r136446, r136253 pending review.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136556 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-30 05:42:50 +00:00
Jakob Stoklund Olesen
73e7dced38 Add an isSSA() flag to MachineRegisterInfo.
This flag is true from isel to register allocation when the machine
function is required to be in SSA form.  The TwoAddressInstructionPass
and PHIElimination passes clear the flag.

The SSA flag wil be used by the machine code verifier to check for SSA
form, and eventually an assertion can enforce it in +Asserts builds.
This will catch the common target error of creating machine code with
multiple defs of a virtual register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136532 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 22:51:22 +00:00
Jakub Staszak
6f6baf1bdd Add more constantness in BranchProbabilityInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136502 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 19:30:00 +00:00
David Greene
cd0bc905d2 Add a std::string Wrapper for TableGen
Create a std::string wrapper for use as a DenseMap key.  DenseMap is
not safe in generate with strings, so this wrapper indicates that only
strings guaranteed not to have certain values should be used in the
DenseMap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136481 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 19:06:58 +00:00
Eli Friedman
55ba816883 Misc optimizer+codegen work for 'cmpxchg' and 'atomicrmw'. They appear to be
working on x86 (at least for trivial testcases); other architectures will
need more work so that they actually emit the appropriate instructions for
orderings stricter than 'monotonic'. (As far as I can tell, the ARM, PPC,
Mips, and Alpha backends need such changes.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136457 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 03:05:32 +00:00
Bill Wendling
e963a3814f Add the AddLandingPadInfo function.
AddLandingPadInfo takes a landingpad instruction and grabs all of the
information from it that it needs for EH table generation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136429 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 23:42:57 +00:00
Eli Friedman
ff03048c13 LangRef and basic memory-representation/reading/writing for 'cmpxchg' and
'atomicrmw' instructions, which allow representing all the current atomic
rmw intrinsics.

The allowed operands for these instructions are heavily restricted at the
moment; we can probably loosen it a bit, but supporting general
first-class types (where it makes sense) might get a bit complicated,
given how SelectionDAG works.

As an initial cut, these operations do not support specifying an alignment,
but it would be possible to add if we think it's useful. Specifying an
alignment lower than the natural alignment would be essentially
impossible to support on anything other than x86, but specifying a greater
alignment would be possible.  I can't think of any useful optimizations which
would use that information, but maybe someone else has ideas.

Optimizer/codegen support coming soon.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136404 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 21:48:00 +00:00
Jakub Staszak
7f1cce55b5 If run with -debug give more information about Cyclic Probability.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136403 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 21:46:58 +00:00
Bill Wendling
1ddaa9c1c6 Use ArrayRef instead of requiring an std::vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136396 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 21:25:33 +00:00
Bill Wendling
7379b66500 The personality function should be a Function* and not just a Value*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136392 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 21:14:13 +00:00
Jakub Staszak
af7a46d5a6 Fix stupid mistake from commit 136381.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136384 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 20:17:18 +00:00
Jakub Staszak
2f9427c6a3 Speed up BlockFrequencyInfo a little bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136381 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 20:09:31 +00:00
Duncan Sands
4ed960061a This file was moved from Support to ADT. Correct a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136344 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 08:36:22 +00:00
Nick Lewycky
297738fa95 In DenseMapInfo<pair<T, U>> tombstone key, use the tombstone for T and U instead
of the empty key for U. This shouldn't really matter because the tombstone key
for the pair was still distinct from every other key, but it is odd. Patch by
Michael Ilseman!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136336 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 06:48:33 +00:00
Bill Wendling
28d735230f Make sure that the landingpad instruction takes a Constant* as the clause's value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136326 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 02:27:12 +00:00
Bill Wendling
7f66c45f35 Add a couple of convenience functions:
* InvokeInst: Get the landingpad instruction associated with this invoke.
* LandingPadInst: A method to reserve extra space for clauses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136325 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 02:15:52 +00:00
Argyrios Kyrtzidis
814450a429 Add an optional 'bool makeAbsolute' in llvm::sys::fs::unique_file function.
If true and 'model' parameter is not an absolute path, a temp directory will be prepended.
Make it true by default to match current behaviour.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136310 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 00:29:20 +00:00
Eli Friedman
1464846801 Code generation for 'fence' instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136283 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-27 22:21:52 +00:00
Jakub Staszak
9a24f1f070 Use BlockFrequency instead of uint32_t in BlockFrequencyInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136278 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-27 22:05:51 +00:00
Bill Wendling
772fe17a6d Merge the contents from exception-handling-rewrite to the mainline.
This adds the new instructions 'landingpad' and 'resume'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136253 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-27 20:18:04 +00:00
Ted Kremenek
18dceba0bb Add a generic 'capacity_in_bytes' function to allow inspection of memory usage of various data structures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136233 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-27 18:40:45 +00:00
Jakub Staszak
636a02b57c Move static methods to the anonymous namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136221 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-27 15:51:51 +00:00
Jakub Staszak
9d9f765519 Edge to itself is backedge as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136219 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-27 15:42:09 +00:00
Eli Friedman
8a552bb85a Misc mid-level changes for new 'fence' instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136205 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-27 01:08:30 +00:00
Eli Friedman
6f3ba37ebb Fix AliasSetTracker so that it doesn't make any assumptions about instructions it doesn't know about (like the atomic instructions I'm adding).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136198 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-27 00:46:46 +00:00
Evan Cheng
bd27f5adbd Support .code32 and .code64 in X86 assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136197 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-27 00:38:12 +00:00
Eli Friedman
be9a9afee5 Fix a couple minor mistakes pointed out by Bill in adding 'fence' instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136124 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-26 20:24:06 +00:00
Andrew Trick
5116ff671f SCEV: Added a data structure for storing not-taken info per loop
exit. Added an interfaces for querying either the loop's exact/max
backedge taken count or a specific loop exit's not-taken count.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136100 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-26 17:19:55 +00:00
Duncan Sands
b08904093a Strip trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136099 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-26 17:19:30 +00:00
Duncan Sands
652b48bf23 Teach the Triple class about kfreebsd (FreeBSD kernel with
a GNU userspace).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136085 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-26 15:30:04 +00:00
Jay Foad
8aa695dc6f Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136068 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-26 09:36:52 +00:00
Evan Cheng
28c85a81a1 Rename createCodeEmitter to createMCCodeEmitter; createObjectStreamer to createMCObjectStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136031 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-26 00:42:34 +00:00
Evan Cheng
94b9550a32 Rename TargetAsmParser to MCTargetAsmParser and TargetAsmLexer to MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136027 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-26 00:24:13 +00:00
Evan Cheng
78c10eeaa5 Rename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to createMCAsmBackend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136010 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 23:24:55 +00:00
Eli Friedman
47f3513dd5 Initial implementation of 'fence' instruction, the new C++0x-style replacement for llvm.memory.barrier.
This is just a LangRef entry and reading/writing/memory representation; optimizer+codegen support coming soon.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136009 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 23:16:38 +00:00
Evan Cheng
f0080016c6 Fix include guards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135998 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 22:52:04 +00:00
Jakub Staszak
15b35677d0 BranchProbability::print returns void now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135994 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 22:27:42 +00:00
Jakub Staszak
a26ec886a3 Add BlockFrequency class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135992 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 22:24:51 +00:00
Evan Cheng
1b0fc9b418 Fix last bits of MC layer issues. llvm-mc doesn't need to initialize TargetMachine's anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135963 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 20:53:02 +00:00
Jakub Staszak
2ecdd72453 Fix class description.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135948 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 20:08:58 +00:00
Jakub Staszak
14a73679c3 Fix #include guard directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135947 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 20:08:00 +00:00
Jakub Staszak
f55c1c8588 Rename BlockFrequency to BlockFrequencyInfo and MachineBlockFrequency to
MachineBlockFrequencyInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135937 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 19:25:40 +00:00
Jay Foad
6d0ac80d5e Remove uses of std::vector from TypeBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135906 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 10:32:27 +00:00
Jay Foad
166579e287 Use ArrayRef in the (protected) constructors of ConstantArray, ConstantStruct and ConstantVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135905 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 10:14:44 +00:00
Jay Foad
a9203109f4 Convert GetElementPtrInst to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135904 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 09:48:08 +00:00
Chris Lattner
b7fbcc9696 switch Triple to take twines instead of stringrefs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135889 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-24 20:45:08 +00:00
Chris Lattner
3f25ee080c Add Twine support for characters, and switch twine to use a union internally
to eliminate some casting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135888 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-24 20:44:30 +00:00
Frits van Bommel
f627530999 Omit explicit length here, now that I've had a chance to test this with gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135867 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-24 09:53:46 +00:00
Benjamin Kramer
59a4f9af0a Fix a silly off by one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135842 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-23 03:04:46 +00:00
Benjamin Kramer
71883edee2 Add more constness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135838 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-23 01:40:15 +00:00
Benjamin Kramer
9df8567548 Turn the DenseSet in MCRegisterClass into a tblgenerated bit field. This should be faster and smaller.
Goodbye static ctors and dtors!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135836 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-23 00:47:49 +00:00
Benjamin Kramer
f496d68493 Give TargetRegisterClass a pointer to the MCRegisterClass and use it to access its data.
This makes TargetRegisterClass slightly slower. Next step will be making contains faster.
Eventually TargetRegisterClass will be killed entirely.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135835 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-23 00:47:46 +00:00
Evan Cheng
a7cfc08ebe Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where they belong.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135833 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-23 00:45:41 +00:00
NAKAMURA Takumi
7decee357b CMake: Fix LLVM_NATIVE_TARGETMC in config.h.cmake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135832 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-23 00:45:23 +00:00
NAKAMURA Takumi
4aa8fe8b24 config.h.cmake: Reorder along config.h.in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135831 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-23 00:45:16 +00:00
Andrew Trick
2045ce154a Move trip count discovery outside of the generic LoopUnroll helper. This
removes its dependence on canonical induction variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135829 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-23 00:33:05 +00:00
Oscar Fuentes
1608637bbd Teach cmake configured headers about LLVM_NATIVE_TARGETMC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135820 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-22 22:21:47 +00:00
Evan Cheng
e78085a3c0 Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,
InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135812 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-22 21:58:54 +00:00
Bill Wendling
1359c6d718 Add a method to set the compact unwind info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135806 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-22 21:17:05 +00:00
Bill Wendling
dda1bdc962 Add a method to get the list of FrameInfos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135805 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-22 21:16:32 +00:00
Jay Foad
0a2a60ace9 Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to use
ArrayRef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135761 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-22 08:16:57 +00:00