NAKAMURA Takumi
212fb11994
configure: Update since r136721.
...
llvm-svn: 137412
2011-08-12 01:50:43 +00:00
Nick Lewycky
a4f1ff9b56
A virtual destructor for the class with virtual methods!
...
llvm-svn: 137400
2011-08-12 00:32:15 +00:00
Andrew Trick
5a5a5ebe68
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.
llvm-svn: 137384
2011-08-11 23:36:16 +00:00
NAKAMURA Takumi
df74220667
DataTypes.h.cmake: Tweak INT32_MIN for MSVC. MSC treats -2147483648 as -(2147483648U).
...
It caused an unexpected behavior since r137254.
llvm-svn: 137365
2011-08-11 21:59:55 +00:00
Chad Rosier
1ff3ae1c91
Typo.
...
llvm-svn: 137286
2011-08-11 00:22:48 +00:00
Devang Patel
504551c7bf
Stay within 80 columns.
...
llvm-svn: 137283
2011-08-10 23:58:09 +00:00
Andrew Trick
306e3d0508
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.
llvm-svn: 137276
2011-08-10 23:22:57 +00:00
Andrew Trick
0a61db0237
Cleanup. Remove an extraneous GraphTraits specialization.
...
llvm-svn: 137264
2011-08-10 22:55:39 +00:00
Devang Patel
1541972a13
Distinguish between two copies of one inlined variable. Take 2.
...
llvm-svn: 137253
2011-08-10 21:50:54 +00:00
Devang Patel
4459f63998
Provide utility to extract and use lexical scoping information from machine instructions.
...
llvm-svn: 137237
2011-08-10 19:04:06 +00:00
Andrew Trick
f598747450
Cleanup. Make ScalarEvolution an explicit argument of the
...
SimplifyIndVar utility since it is required.
llvm-svn: 137202
2011-08-10 04:22:26 +00:00
Andrew Trick
b85da1c369
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.
llvm-svn: 137197
2011-08-10 03:46:27 +00:00
Andrew Trick
d10d5f0609
Cleanup. Added LoopBlocksDFS::perform for simple clients.
...
llvm-svn: 137195
2011-08-10 01:59:05 +00:00
Peter Collingbourne
1d25d83435
Preserve the name for this variant of IRBuilder::CreateCall
...
llvm-svn: 137192
2011-08-10 01:10:08 +00:00
Andrew Trick
c7ba3c5cd2
Cleanup. Avoid relying on specialization of std::distance.
...
llvm-svn: 137191
2011-08-10 00:49:12 +00:00
Andrew Trick
3ed0cd3cb6
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.
llvm-svn: 137190
2011-08-10 00:28:10 +00:00
Jakob Stoklund Olesen
f7f4398587
Trim an unneeded header.
...
llvm-svn: 137184
2011-08-09 23:49:21 +00:00
Eli Friedman
5a2d27800e
Representation of 'atomic load' and 'atomic store' in IR.
...
llvm-svn: 137170
2011-08-09 23:02:53 +00:00
Rafael Espindola
0e580ecc63
Add missing file.
...
llvm-svn: 137162
2011-08-09 22:19:52 +00:00
Jakob Stoklund Olesen
cbd8bcf3b8
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.
llvm-svn: 137123
2011-08-09 16:46:27 +00:00
Devang Patel
1d038e6e01
Provide method to print variable's extended name which includes inline location.
...
llvm-svn: 137095
2011-08-09 01:03:14 +00:00
Jakob Stoklund Olesen
2f58336f2f
Refer to the RegisterCoalescer pass by ID.
...
A public interface is no longer needed since RegisterCoalescer is not an
analysis any more.
llvm-svn: 137082
2011-08-09 00:29:53 +00:00
Jakob Stoklund Olesen
9451389166
Hoist hasLoadFromStackSlot and hasStoreToStackSlot.
...
These the methods are target-independent since they simply scan the
memory operands. They can live in TargetInstrInfoImpl.
llvm-svn: 137063
2011-08-08 20:53:24 +00:00
Benjamin Kramer
3490c59cda
Pacify virtual dtor warnings and cmake buildbots.
...
llvm-svn: 137060
2011-08-08 19:09:02 +00:00
Benjamin Kramer
8c3f23ec80
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.
llvm-svn: 137059
2011-08-08 18:56:44 +00:00
Chandler Carruth
e833bbd11e
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!
llvm-svn: 136953
2011-08-05 00:51:31 +00:00
Duncan Sands
b034709948
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.
llvm-svn: 136881
2011-08-04 16:01:54 +00:00
Andrew Trick
aebed187b7
Reverting r136884 updateUnloop, which crashed a linux builder.
...
llvm-svn: 136857
2011-08-04 01:04:37 +00:00
Andrew Trick
cfb48e5133
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.
llvm-svn: 136844
2011-08-03 23:50:25 +00:00
Andrew Trick
4b22856b91
whitespace
...
llvm-svn: 136840
2011-08-03 23:43:49 +00:00
Andrew Trick
b20e31e81f
An interface for iterating over a loop's blocks in DFS order.
...
llvm-svn: 136838
2011-08-03 23:27:28 +00:00
Bill Wendling
fdea9930ac
Remove the LowerSetJmp pass. It wasn't used effectively by any of the targets.
...
This is some of my original LLVM code. *wipes tear*
llvm-svn: 136821
2011-08-03 22:18:20 +00:00
Owen Anderson
2331040816
Add accessors for manipulating an MCInst's operands.
...
llvm-svn: 136818
2011-08-03 21:52:15 +00:00
Jakub Staszak
7b30ba0db8
Add more constantness in BlockFrequencyInfo.
...
llvm-svn: 136816
2011-08-03 21:30:57 +00:00
Eli Friedman
afd08dcc2c
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.
llvm-svn: 136813
2011-08-03 21:06:02 +00:00
Bill Wendling
9db96fc81f
Remove CreateUnwind from the IRBuillder.
...
llvm-svn: 136811
2011-08-03 20:53:38 +00:00
Andrew Trick
bbb5c7b0aa
SCEV: Use AssertingVH to catch dangling BasicBlock* when passes forget
...
to notify SCEV of a change. Add forgetLoop in a couple of those places.
llvm-svn: 136797
2011-08-03 18:32:11 +00:00
Jay Foad
095dcdbd48
Use cast<> instead of a C-style cast to get some free assertions.
...
llvm-svn: 136771
2011-08-03 10:05:04 +00:00
Rafael Espindola
2b0d064f3b
Move methods in PassManagerBuilder offline.
...
llvm-svn: 136727
2011-08-02 21:50:27 +00:00
Rafael Espindola
73efcf56f6
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.
llvm-svn: 136726
2011-08-02 21:50:24 +00:00
Rafael Espindola
cefc38659a
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.
llvm-svn: 136716
2011-08-02 20:24:22 +00:00
Roman Divacky
7453a0dcd6
Sketch out PowerPC ELF writer. This is enough to get clang -integrated-as
...
to compile a working hello world on FreeBSD/PPC32.
llvm-svn: 136689
2011-08-02 15:51:38 +00:00
Bill Wendling
b37af02067
Remove the LLVMBuildUnwind C API function.
...
The 'unwind' function is going away with the new EH rewrite. This is step 0 in
keeping front-ends from using it.
llvm-svn: 136683
2011-08-02 06:20:17 +00:00
Andrew Trick
86f6a3c645
Use consistent terminology for loop exit/exiting blocks. Name change only.
...
llvm-svn: 136677
2011-08-02 04:23:35 +00:00
Eli Friedman
564f52b2bf
Fix a couple silly typos in IRBuilder in the new atomic instructions.
...
llvm-svn: 136665
2011-08-02 00:45:35 +00:00
Owen Anderson
4ee266955a
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.
...
llvm-svn: 136634
2011-08-01 18:43:18 +00:00
Jakub Staszak
db23d8b195
Add BlockFrequency::getEntryFrequency()
...
llvm-svn: 136618
2011-08-01 15:22:10 +00:00
Jay Foad
f5b5b93126
The operands of a GlobalAlias are always Constants. Simplify things
...
accordingly.
llvm-svn: 136608
2011-08-01 12:20:36 +00:00
Bill Wendling
8a625cebd2
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).
llvm-svn: 136589
2011-07-31 06:30:59 +00:00
Bill Wendling
57ddbb84ac
Revert r136253, r136263, r136269, r136313, r136325, r136326, r136329, r136338,
...
r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444,
r136445, r136446, r136253 pending review.
llvm-svn: 136556
2011-07-30 05:42:50 +00:00
Jakob Stoklund Olesen
7b77f35a1b
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.
llvm-svn: 136532
2011-07-29 22:51:22 +00:00
Jakub Staszak
02fa079dc3
Add more constantness in BranchProbabilityInfo.
...
llvm-svn: 136502
2011-07-29 19:30:00 +00:00
David Greene
5927323d9c
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.
llvm-svn: 136481
2011-07-29 19:06:58 +00:00
Eli Friedman
6f2419f1a2
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.)
llvm-svn: 136457
2011-07-29 03:05:32 +00:00
Bill Wendling
e4090cc864
Add the AddLandingPadInfo function.
...
AddLandingPadInfo takes a landingpad instruction and grabs all of the
information from it that it needs for EH table generation.
llvm-svn: 136429
2011-07-28 23:42:57 +00:00
Eli Friedman
f6797ffc9a
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.
llvm-svn: 136404
2011-07-28 21:48:00 +00:00
Jakub Staszak
6076fe7cff
If run with -debug give more information about Cyclic Probability.
...
llvm-svn: 136403
2011-07-28 21:46:58 +00:00
Bill Wendling
dba29efd6f
Use ArrayRef instead of requiring an std::vector.
...
llvm-svn: 136396
2011-07-28 21:25:33 +00:00
Bill Wendling
22f729dcfb
The personality function should be a Function* and not just a Value*.
...
llvm-svn: 136392
2011-07-28 21:14:13 +00:00
Jakub Staszak
22fcf6c40b
Fix stupid mistake from commit 136381.
...
llvm-svn: 136384
2011-07-28 20:17:18 +00:00
Jakub Staszak
534e099ba0
Speed up BlockFrequencyInfo a little bit.
...
llvm-svn: 136381
2011-07-28 20:09:31 +00:00
Duncan Sands
beab1f4882
This file was moved from Support to ADT. Correct a comment.
...
llvm-svn: 136344
2011-07-28 08:36:22 +00:00
Nick Lewycky
31d1c92d69
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!
llvm-svn: 136336
2011-07-28 06:48:33 +00:00
Bill Wendling
b75e5fc784
Make sure that the landingpad instruction takes a Constant* as the clause's value.
...
llvm-svn: 136326
2011-07-28 02:27:12 +00:00
Bill Wendling
03445c79b9
Add a couple of convenience functions:
...
* InvokeInst: Get the landingpad instruction associated with this invoke.
* LandingPadInst: A method to reserve extra space for clauses.
llvm-svn: 136325
2011-07-28 02:15:52 +00:00
Argyrios Kyrtzidis
a95f22ea2b
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.
llvm-svn: 136310
2011-07-28 00:29:20 +00:00
Eli Friedman
842ea169de
Code generation for 'fence' instruction.
...
llvm-svn: 136283
2011-07-27 22:21:52 +00:00
Jakub Staszak
f5076015fc
Use BlockFrequency instead of uint32_t in BlockFrequencyInfo.
...
llvm-svn: 136278
2011-07-27 22:05:51 +00:00
Bill Wendling
b96d318578
Keep enums stable. Append EH stuff to the end.
...
llvm-svn: 136263
2011-07-27 21:00:28 +00:00
Bill Wendling
b20cfdfe95
Merge the contents from exception-handling-rewrite to the mainline.
...
This adds the new instructions 'landingpad' and 'resume'.
llvm-svn: 136253
2011-07-27 20:18:04 +00:00
Eli Friedman
a36a11b45b
The numbering of LLVMOpcode is supposed to be stable; revert my earlier change, and append Fence onto the end.
...
llvm-svn: 136245
2011-07-27 18:59:19 +00:00
Ted Kremenek
ee0970dabc
Add a generic 'capacity_in_bytes' function to allow inspection of memory usage of various data structures.
...
llvm-svn: 136233
2011-07-27 18:40:45 +00:00
Jakub Staszak
29ef880b52
Move static methods to the anonymous namespace.
...
llvm-svn: 136221
2011-07-27 15:51:51 +00:00
Jakub Staszak
d5378ec61f
Edge to itself is backedge as well.
...
llvm-svn: 136219
2011-07-27 15:42:09 +00:00
Eli Friedman
f226974353
Misc mid-level changes for new 'fence' instruction.
...
llvm-svn: 136205
2011-07-27 01:08:30 +00:00
Eli Friedman
2da127e60a
Fix AliasSetTracker so that it doesn't make any assumptions about instructions it doesn't know about (like the atomic instructions I'm adding).
...
llvm-svn: 136198
2011-07-27 00:46:46 +00:00
Evan Cheng
bff9934d9a
Support .code32 and .code64 in X86 assembler.
...
llvm-svn: 136197
2011-07-27 00:38:12 +00:00
Eli Friedman
22e4c4d12d
Fix a couple minor mistakes pointed out by Bill in adding 'fence' instruction.
...
llvm-svn: 136124
2011-07-26 20:24:06 +00:00
Andrew Trick
ae93f1bf46
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.
llvm-svn: 136100
2011-07-26 17:19:55 +00:00
Duncan Sands
8b264d3264
Strip trailing whitespace.
...
llvm-svn: 136099
2011-07-26 17:19:30 +00:00
Duncan Sands
0a14a12b51
Teach the Triple class about kfreebsd (FreeBSD kernel with
...
a GNU userspace).
llvm-svn: 136085
2011-07-26 15:30:04 +00:00
Rafael Espindola
a4148a5a84
Add LLVMAddAlwaysInlinerPass to the C API.
...
llvm-svn: 136083
2011-07-26 15:23:23 +00:00
Rafael Espindola
d7295c15ab
LLVM 3.0 is here, remove old do nothing method.
...
llvm-svn: 136082
2011-07-26 15:17:32 +00:00
Jay Foad
fe750c827a
Fix typo in comment.
...
llvm-svn: 136068
2011-07-26 09:36:52 +00:00
Evan Cheng
8e380354c4
Rename createCodeEmitter to createMCCodeEmitter; createObjectStreamer to createMCObjectStreamer.
...
llvm-svn: 136031
2011-07-26 00:42:34 +00:00
Evan Cheng
2e96785311
Rename TargetAsmParser to MCTargetAsmParser and TargetAsmLexer to MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser.
...
llvm-svn: 136027
2011-07-26 00:24:13 +00:00
Evan Cheng
2a0a4e1a73
Rename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to createMCAsmBackend.
...
llvm-svn: 136010
2011-07-25 23:24:55 +00:00
Eli Friedman
50291d09da
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.
llvm-svn: 136009
2011-07-25 23:16:38 +00:00
Evan Cheng
58e5fd1f16
Fix include guards.
...
llvm-svn: 135998
2011-07-25 22:52:04 +00:00
Jakub Staszak
ddeb8772c8
BranchProbability::print returns void now.
...
llvm-svn: 135994
2011-07-25 22:27:42 +00:00
Jakub Staszak
b4bffb255a
Add BlockFrequency class.
...
llvm-svn: 135992
2011-07-25 22:24:51 +00:00
Rafael Espindola
7c7d45a67c
Add LLVMAddTargetLibraryInfo to the C API.
...
llvm-svn: 135975
2011-07-25 21:20:54 +00:00
Rafael Espindola
e982fa5f80
Add LLVMAddLowerExpectIntrinsicPass to the C API.
...
llvm-svn: 135966
2011-07-25 20:57:59 +00:00
Evan Cheng
1d04cd9b26
Fix last bits of MC layer issues. llvm-mc doesn't need to initialize TargetMachine's anymore.
...
llvm-svn: 135963
2011-07-25 20:53:02 +00:00
Jakub Staszak
171cc8d07d
Fix class description.
...
llvm-svn: 135948
2011-07-25 20:08:58 +00:00
Jakub Staszak
2873980483
Fix #include guard directive.
...
llvm-svn: 135947
2011-07-25 20:08:00 +00:00
Jakub Staszak
5c309cbead
Rename BlockFrequency to BlockFrequencyInfo and MachineBlockFrequency to
...
MachineBlockFrequencyInfo.
llvm-svn: 135937
2011-07-25 19:25:40 +00:00
Jay Foad
278089b983
Remove uses of std::vector from TypeBuilder.
...
llvm-svn: 135906
2011-07-25 10:32:27 +00:00
Jay Foad
4f279f9a6f
Use ArrayRef in the (protected) constructors of ConstantArray, ConstantStruct and ConstantVector.
...
llvm-svn: 135905
2011-07-25 10:14:44 +00:00
Jay Foad
6513dac6e2
Convert GetElementPtrInst to use ArrayRef.
...
llvm-svn: 135904
2011-07-25 09:48:08 +00:00
Chris Lattner
489601c923
switch Triple to take twines instead of stringrefs.
...
llvm-svn: 135889
2011-07-24 20:45:08 +00:00
Chris Lattner
0e3472660b
Add Twine support for characters, and switch twine to use a union internally
...
to eliminate some casting.
llvm-svn: 135888
2011-07-24 20:44:30 +00:00
Frits van Bommel
e238f52543
Omit explicit length here, now that I've had a chance to test this with gcc.
...
llvm-svn: 135867
2011-07-24 09:53:46 +00:00
Benjamin Kramer
40ed4c3e06
Fix a silly off by one.
...
llvm-svn: 135842
2011-07-23 03:04:46 +00:00
Benjamin Kramer
35d7f76497
Add more constness.
...
llvm-svn: 135838
2011-07-23 01:40:15 +00:00
Benjamin Kramer
a1e84a1998
Turn the DenseSet in MCRegisterClass into a tblgenerated bit field. This should be faster and smaller.
...
Goodbye static ctors and dtors!
llvm-svn: 135836
2011-07-23 00:47:49 +00:00
Benjamin Kramer
0fc2a68e8f
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.
llvm-svn: 135835
2011-07-23 00:47:46 +00:00
Evan Cheng
13d54fc7c9
Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where they belong.
...
llvm-svn: 135833
2011-07-23 00:45:41 +00:00
NAKAMURA Takumi
0912faa08f
CMake: Fix LLVM_NATIVE_TARGETMC in config.h.cmake.
...
llvm-svn: 135832
2011-07-23 00:45:23 +00:00
NAKAMURA Takumi
e8c8f7fe0e
config.h.cmake: Reorder along config.h.in.
...
llvm-svn: 135831
2011-07-23 00:45:16 +00:00
Andrew Trick
53ed0491c0
Move trip count discovery outside of the generic LoopUnroll helper. This
...
removes its dependence on canonical induction variables.
llvm-svn: 135829
2011-07-23 00:33:05 +00:00
Oscar Fuentes
260c1b0c41
Teach cmake configured headers about LLVM_NATIVE_TARGETMC
...
llvm-svn: 135820
2011-07-22 22:21:47 +00:00
Evan Cheng
7b4cb12a95
Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,
...
InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC.
llvm-svn: 135812
2011-07-22 21:58:54 +00:00
Bill Wendling
a289f709aa
Add a method to set the compact unwind info.
...
llvm-svn: 135806
2011-07-22 21:17:05 +00:00
Bill Wendling
2eea7949c2
Add a method to get the list of FrameInfos.
...
llvm-svn: 135805
2011-07-22 21:16:32 +00:00
Jay Foad
42463ed852
Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to use
...
ArrayRef.
llvm-svn: 135761
2011-07-22 08:16:57 +00:00
Chandler Carruth
0ad63a1326
Move the logic for printing the registered targets into a static
...
function on the TargetRegistry. Also clean it up and use the modern LLVM
utility libraries available instead of rolling a few things manually.
llvm-svn: 135756
2011-07-22 07:50:44 +00:00
Chandler Carruth
6931004b83
Add an extension point to the CommandLine library where clients can
...
register extra version information to be printed. This is designed to
allow those tools which link in various targets to also print those
registered targets under --version.
Currently this printing logic is embedded into the Support library
directly; a huge layering violation. This is the first step to hoisting
it out into the tools without adding lots of duplicated code.
llvm-svn: 135755
2011-07-22 07:50:40 +00:00
Jakub Staszak
cf5ebedf56
Allow getBlockFreq to return 0.
...
llvm-svn: 135742
2011-07-22 02:24:57 +00:00
Benjamin Kramer
eca22965a3
Teach tblgen to emit MCRegisterClasses.
...
- This currently introduces more instances of the static DenseSet dtor, but that should be fixable.
llvm-svn: 135735
2011-07-22 00:44:39 +00:00
Benjamin Kramer
6ab8d85f64
Initialize DenseSets lazily.
...
llvm-svn: 135717
2011-07-21 23:03:59 +00:00
Benjamin Kramer
727a49e530
Sink parts of TargetRegisterClass into MCRegisterClass.
...
llvm-svn: 135683
2011-07-21 17:26:50 +00:00
Jay Foad
d4458dd707
Convert ConstantExpr::getGetElementPtr and
...
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef.
llvm-svn: 135673
2011-07-21 14:31:17 +00:00
Jay Foad
5d70c8e85d
Update llvm-gcc-4.2 and dragonegg after converting ConstantFolder APIs
...
to use ArrayRef.
llvm-svn: 135672
2011-07-21 09:19:11 +00:00
Jay Foad
483a783217
Convert ConstantFolder APIs to use ArrayRef.
...
llvm-svn: 135671
2011-07-21 07:52:17 +00:00
Chris Lattner
c4ab50bd33
move tier out of an anonymous namespace, it doesn't make sense
...
to for it to be an an anon namespace and be in a header.
Eliminate some extraenous uses of tie.
llvm-svn: 135669
2011-07-21 06:21:31 +00:00
Bill Wendling
55eb4a26d9
Remove the now defunct getCompactUnwindEncoding method from the frame lowering code.
...
llvm-svn: 135634
2011-07-20 23:04:09 +00:00
Devang Patel
284b502be9
There are two ways to map a variable to its lexical scope. Lexical scope information is embedded in MDNode describing the variable. It is also available as a part of DebugLoc attached with DBG_VALUE instruction. DebugLoc attached with an instruction is less reliable in optimized code so use information embedded in the MDNode.
...
llvm-svn: 135629
2011-07-20 22:18:50 +00:00
Evan Cheng
c9bc5a9011
Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.
...
There is still a bit more refactoring left to do in Targets. But we are now very
close to fixing all the layering issues in MC.
llvm-svn: 135611
2011-07-20 19:50:42 +00:00
Eric Christopher
a7456220ba
Regenerate configure and friends for Chad.
...
llvm-svn: 135592
2011-07-20 17:04:49 +00:00
Evan Cheng
55d7fcc5f7
- Move CodeModel from a TargetMachine global option to MCCodeGenInfo.
...
- Introduce JITDefault code model. This tells targets to set different default
code model for JIT. This eliminates the ugly hack in TargetMachine where
code model is changed after construction.
llvm-svn: 135580
2011-07-20 07:51:56 +00:00
Evan Cheng
380dc98371
Add MCObjectFileInfo and sink the MCSections initialization code from
...
TargetLoweringObjectFileImpl down to MCObjectFileInfo.
TargetAsmInfo is done to one last method. It's *almost* gone!
llvm-svn: 135569
2011-07-20 05:58:47 +00:00
Devang Patel
65afdd27d0
Distinguish between two copies of one inlined variable.
...
llvm-svn: 135528
2011-07-19 22:31:15 +00:00
Owen Anderson
ad0f17c102
Enhance the FixedLengthDecoder to be able to generate plausible-looking decoders for ARM.
...
llvm-svn: 135524
2011-07-19 21:06:00 +00:00
Devang Patel
5a4bb57ec5
Reapply r135457. This needs llvm-gcc change, that I forgot to check-in yesterday.
...
llvm-svn: 135504
2011-07-19 19:41:54 +00:00
Bob Wilson
7c9092c9aa
Revert "Make a provision to encode inline location in a variable. This will enable dwarf writer to easily distinguish between two instances of a inlined variable in one basic block."
...
This reverts commit 9fec5e346efdf744b151ae6604f912908315fa7a.
llvm-svn: 135486
2011-07-19 16:32:50 +00:00
Jay Foad
bbbf29aab7
Convert SimplifyGEPInst to use ArrayRef.
...
llvm-svn: 135482
2011-07-19 15:07:52 +00:00
Jay Foad
83a0e1fa99
Convert gep_type_begin and gep_type_end to use ArrayRef.
...
llvm-svn: 135481
2011-07-19 14:42:50 +00:00
Jay Foad
0974b71f17
Convert TargetData::getIndexedOffset to use ArrayRef.
...
llvm-svn: 135478
2011-07-19 14:01:37 +00:00
Jay Foad
ae5894c5cc
Use ArrayRef in ConstantFoldInstOperands and ConstantFoldCall.
...
llvm-svn: 135477
2011-07-19 13:32:40 +00:00
Richard Osborne
b469141419
Add intrinsics for the zext / sext instructions.
...
llvm-svn: 135476
2011-07-19 13:28:50 +00:00
Richard Osborne
50303e0d38
Add intrinsics for the testct, testwct instructions.
...
llvm-svn: 135475
2011-07-19 13:00:40 +00:00
Richard Osborne
409c0d7768
Add intrinsics for the peek and endin instructions.
...
llvm-svn: 135474
2011-07-19 12:50:25 +00:00
Evan Cheng
bfc0cac54d
Introduce MCCodeGenInfo, which keeps information that can affect codegen
...
(including compilation, assembly). Move relocation model Reloc::Model from
TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine.
llvm-svn: 135468
2011-07-19 06:37:02 +00:00
Eli Friedman
99b95e531f
Make isLoadExtLegal and isTruncStoreLegal check what the name says. :) This might have some minor effect on CellSPU, but all other targets should be unaffected. Fixing per report from Damien Vincent on llvmdev.
...
llvm-svn: 135462
2011-07-19 02:24:07 +00:00
Devang Patel
e50d45c876
Make a provision to encode inline location in a variable. This will enable dwarf writer to easily distinguish between two instances of a inlined variable in one basic block.
...
llvm-svn: 135457
2011-07-19 01:03:32 +00:00
Devang Patel
72886ba8d8
Revert r135423.
...
llvm-svn: 135454
2011-07-19 00:28:24 +00:00
Bill Wendling
6211e2602f
Add a method to set compact unwind encoding information in a frame.
...
llvm-svn: 135449
2011-07-19 00:01:42 +00:00
Bill Wendling
b1d5a0798a
Rename CompactEncoding to CompactUnwindEncoding.
...
llvm-svn: 135448
2011-07-19 00:00:58 +00:00
Bill Wendling
408386e3ef
Add a field for the compact unwind encoding.
...
llvm-svn: 135446
2011-07-19 00:00:05 +00:00