Jakub Staszak
efd94c8fea
Add more constantness in BranchProbabilityInfo.
...
llvm-svn: 136502
2011-07-29 19:30:00 +00:00
David Greene
ea844f0bc9
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
adec587d5c
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
7fa7fe6b58
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
c9a551ebed
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
07f0f02bc5
If run with -debug give more information about Cyclic Probability.
...
llvm-svn: 136403
2011-07-28 21:46:58 +00:00
Bill Wendling
f8d95bc4c6
Use ArrayRef instead of requiring an std::vector.
...
llvm-svn: 136396
2011-07-28 21:25:33 +00:00
Bill Wendling
4f027233d2
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
14852b182e
Fix stupid mistake from commit 136381.
...
llvm-svn: 136384
2011-07-28 20:17:18 +00:00
Jakub Staszak
d7ac43eed1
Speed up BlockFrequencyInfo a little bit.
...
llvm-svn: 136381
2011-07-28 20:09:31 +00:00
Duncan Sands
5710211af0
This file was moved from Support to ADT. Correct a comment.
...
llvm-svn: 136344
2011-07-28 08:36:22 +00:00
Nick Lewycky
3255d1d25f
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
4c93488999
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
a8f04e3034
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
348937de07
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
26a484852e
Code generation for 'fence' instruction.
...
llvm-svn: 136283
2011-07-27 22:21:52 +00:00
Jakub Staszak
da3df4302a
Use BlockFrequency instead of uint32_t in BlockFrequencyInfo.
...
llvm-svn: 136278
2011-07-27 22:05:51 +00:00
Bill Wendling
2641d132d1
Keep enums stable. Append EH stuff to the end.
...
llvm-svn: 136263
2011-07-27 21:00:28 +00:00
Bill Wendling
6c923bb8d9
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
4fc946cc71
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
666bec46a0
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
a9e8aa0482
Move static methods to the anonymous namespace.
...
llvm-svn: 136221
2011-07-27 15:51:51 +00:00
Jakub Staszak
107339e31a
Edge to itself is backedge as well.
...
llvm-svn: 136219
2011-07-27 15:42:09 +00:00
Eli Friedman
89b694b096
Misc mid-level changes for new 'fence' instruction.
...
llvm-svn: 136205
2011-07-27 01:08:30 +00:00
Eli Friedman
ae8161e774
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
481ebb0133
Support .code32 and .code64 in X86 assembler.
...
llvm-svn: 136197
2011-07-27 00:38:12 +00:00
Eli Friedman
4e8e257d58
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
3ca3f98c2c
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
6d473aa378
Strip trailing whitespace.
...
llvm-svn: 136099
2011-07-26 17:19:30 +00:00
Duncan Sands
fe44f67d43
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
b84dc6bca8
Add LLVMAddAlwaysInlinerPass to the C API.
...
llvm-svn: 136083
2011-07-26 15:23:23 +00:00
Rafael Espindola
be2fe29f9c
LLVM 3.0 is here, remove old do nothing method.
...
llvm-svn: 136082
2011-07-26 15:17:32 +00:00
Jay Foad
6a51402a8a
Fix typo in comment.
...
llvm-svn: 136068
2011-07-26 09:36:52 +00:00
Evan Cheng
3a79225b4c
Rename createCodeEmitter to createMCCodeEmitter; createObjectStreamer to createMCObjectStreamer.
...
llvm-svn: 136031
2011-07-26 00:42:34 +00:00
Evan Cheng
1142444565
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
5928e69d20
Rename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to createMCAsmBackend.
...
llvm-svn: 136010
2011-07-25 23:24:55 +00:00
Eli Friedman
fee02c6c13
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
1740a97734
Fix include guards.
...
llvm-svn: 135998
2011-07-25 22:52:04 +00:00
Jakub Staszak
e92d047b51
BranchProbability::print returns void now.
...
llvm-svn: 135994
2011-07-25 22:27:42 +00:00
Jakub Staszak
49993f26bf
Add BlockFrequency class.
...
llvm-svn: 135992
2011-07-25 22:24:51 +00:00
Rafael Espindola
e96fd5a4fe
Add LLVMAddTargetLibraryInfo to the C API.
...
llvm-svn: 135975
2011-07-25 21:20:54 +00:00
Rafael Espindola
7281395c8c
Add LLVMAddLowerExpectIntrinsicPass to the C API.
...
llvm-svn: 135966
2011-07-25 20:57:59 +00:00
Evan Cheng
f60768a14e
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
12bc09c843
Fix class description.
...
llvm-svn: 135948
2011-07-25 20:08:58 +00:00
Jakub Staszak
4e48f3df16
Fix #include guard directive.
...
llvm-svn: 135947
2011-07-25 20:08:00 +00:00
Jakub Staszak
875ebd5f5d
Rename BlockFrequency to BlockFrequencyInfo and MachineBlockFrequency to
...
MachineBlockFrequencyInfo.
llvm-svn: 135937
2011-07-25 19:25:40 +00:00
Jay Foad
a9f7959897
Remove uses of std::vector from TypeBuilder.
...
llvm-svn: 135906
2011-07-25 10:32:27 +00:00
Jay Foad
89d9b81a3a
Use ArrayRef in the (protected) constructors of ConstantArray, ConstantStruct and ConstantVector.
...
llvm-svn: 135905
2011-07-25 10:14:44 +00:00
Jay Foad
d1b7849d49
Convert GetElementPtrInst to use ArrayRef.
...
llvm-svn: 135904
2011-07-25 09:48:08 +00:00
Chris Lattner
d757d3f5c2
switch Triple to take twines instead of stringrefs.
...
llvm-svn: 135889
2011-07-24 20:45:08 +00:00
Chris Lattner
9650f0678c
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
ba50c2b55c
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
8957aaa2d2
Fix a silly off by one.
...
llvm-svn: 135842
2011-07-23 03:04:46 +00:00
Benjamin Kramer
eeddeb9601
Add more constness.
...
llvm-svn: 135838
2011-07-23 01:40:15 +00:00
Benjamin Kramer
346f3a3b8c
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
2754ca1e10
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
f2596bc62a
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
61a38c7f7f
CMake: Fix LLVM_NATIVE_TARGETMC in config.h.cmake.
...
llvm-svn: 135832
2011-07-23 00:45:23 +00:00
NAKAMURA Takumi
b8851ee6aa
config.h.cmake: Reorder along config.h.in.
...
llvm-svn: 135831
2011-07-23 00:45:16 +00:00
Andrew Trick
1cabe54fab
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
383c487644
Teach cmake configured headers about LLVM_NATIVE_TARGETMC
...
llvm-svn: 135820
2011-07-22 22:21:47 +00:00
Evan Cheng
8c886a40d2
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
53b7402486
Add a method to set the compact unwind info.
...
llvm-svn: 135806
2011-07-22 21:17:05 +00:00
Bill Wendling
fac2ebf7e5
Add a method to get the list of FrameInfos.
...
llvm-svn: 135805
2011-07-22 21:16:32 +00:00
Jay Foad
040dd82f44
Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to use
...
ArrayRef.
llvm-svn: 135761
2011-07-22 08:16:57 +00:00
Chandler Carruth
2baac02c94
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
ea7e55272c
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
b82bbf40bb
Allow getBlockFreq to return 0.
...
llvm-svn: 135742
2011-07-22 02:24:57 +00:00
Benjamin Kramer
1eb27ae580
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
737a3dac02
Initialize DenseSets lazily.
...
llvm-svn: 135717
2011-07-21 23:03:59 +00:00
Benjamin Kramer
5fb7737513
Sink parts of TargetRegisterClass into MCRegisterClass.
...
llvm-svn: 135683
2011-07-21 17:26:50 +00:00
Jay Foad
ed8db7d9df
Convert ConstantExpr::getGetElementPtr and
...
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef.
llvm-svn: 135673
2011-07-21 14:31:17 +00:00
Jay Foad
95f1ebd41b
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
32351fa820
Convert ConstantFolder APIs to use ArrayRef.
...
llvm-svn: 135671
2011-07-21 07:52:17 +00:00
Chris Lattner
5cf753c95e
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
01bd7d9dc0
Remove the now defunct getCompactUnwindEncoding method from the frame lowering code.
...
llvm-svn: 135634
2011-07-20 23:04:09 +00:00
Devang Patel
8fb9fd6769
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
bbf3b0de8b
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
65080cc55c
Regenerate configure and friends for Chad.
...
llvm-svn: 135592
2011-07-20 17:04:49 +00:00
Evan Cheng
efd9b4240f
- 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
76792992d6
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
a59b24b090
Distinguish between two copies of one inlined variable.
...
llvm-svn: 135528
2011-07-19 22:31:15 +00:00
Owen Anderson
c78e03c39a
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
cfa82a378d
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
da30cf84c3
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
b992a635fb
Convert SimplifyGEPInst to use ArrayRef.
...
llvm-svn: 135482
2011-07-19 15:07:52 +00:00
Jay Foad
528bedaf5d
Convert gep_type_begin and gep_type_end to use ArrayRef.
...
llvm-svn: 135481
2011-07-19 14:42:50 +00:00
Jay Foad
bf904773bb
Convert TargetData::getIndexedOffset to use ArrayRef.
...
llvm-svn: 135478
2011-07-19 14:01:37 +00:00
Jay Foad
f4b14a2b0d
Use ArrayRef in ConstantFoldInstOperands and ConstantFoldCall.
...
llvm-svn: 135477
2011-07-19 13:32:40 +00:00
Richard Osborne
f1b800998a
Add intrinsics for the zext / sext instructions.
...
llvm-svn: 135476
2011-07-19 13:28:50 +00:00
Richard Osborne
252c43ee88
Add intrinsics for the testct, testwct instructions.
...
llvm-svn: 135475
2011-07-19 13:00:40 +00:00
Richard Osborne
707f0beae1
Add intrinsics for the peek and endin instructions.
...
llvm-svn: 135474
2011-07-19 12:50:25 +00:00
Evan Cheng
2129f59637
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
8608e6e913
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
ac532dedf1
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
9ab3cac694
Revert r135423.
...
llvm-svn: 135454
2011-07-19 00:28:24 +00:00
Bill Wendling
c438d78c38
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
6969ed6286
Rename CompactEncoding to CompactUnwindEncoding.
...
llvm-svn: 135448
2011-07-19 00:00:58 +00:00
Bill Wendling
c1e40ddde2
Add a field for the compact unwind encoding.
...
llvm-svn: 135446
2011-07-19 00:00:05 +00:00
Bill Wendling
353404d924
Move the compact encoding from the target-specific library to the code-gen
...
library.
llvm-svn: 135443
2011-07-18 23:38:40 +00:00
Evan Cheng
4ce2e4f289
Eliminate TargetAsmInfo::getCompactUnwindEncoding. This get rid of the
...
use of TargetFrameLowering in TargetAsmInfo.
llvm-svn: 135439
2011-07-18 22:32:12 +00:00
Evan Cheng
67c033e6b8
Move getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions for
...
better location welcome).
llvm-svn: 135438
2011-07-18 22:29:13 +00:00
Jeffrey Yasskin
7a16288157
Add APInt(numBits, ArrayRef<uint64_t> bigVal) constructor to prevent future ambiguity
...
errors like the one corrected by r135261. Migrate all LLVM callers of the old
constructor to the new one.
llvm-svn: 135431
2011-07-18 21:45:40 +00:00
Evan Cheng
d60fa58ba1
Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo down
...
to MCRegisterInfo. Also initialize the mapping at construction time.
This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step
towards fixing the layering violation.
llvm-svn: 135424
2011-07-18 20:57:22 +00:00
Devang Patel
4dc76f2438
During bottom up fast-isel, instructions emitted to materalize registers are at top of basic block and do not have debug location. This may misguide debugger while entering the basic block and sometimes debugger provides semi useful view of current location to developer by picking up previous known location as current location. Assign a sensible location to the first instruction in a basic block, if it does not have one location derived from source file, so that debugger can provide meaningful user experience to developers in edge cases.
...
[take 2]
llvm-svn: 135423
2011-07-18 20:55:23 +00:00
Chris Lattner
71fbd6b228
various cleanups noticed by Frits
...
llvm-svn: 135396
2011-07-18 16:35:57 +00:00
Chris Lattner
e5f440204b
remove pasto
...
llvm-svn: 135394
2011-07-18 16:04:11 +00:00
Frits van Bommel
1b3ee75077
Hopefully fix some GCC-based buildbots. GCC apparently decays the array to a pointer here before overload resolution, so construct with an explicit length instead.
...
llvm-svn: 135391
2011-07-18 12:31:03 +00:00
Frits van Bommel
717d7edd3e
Migrate LLVM and Clang to use the new makeArrayRef(...) functions where previously explicit non-default constructors were used.
...
Mostly mechanical with some manual reformatting.
llvm-svn: 135390
2011-07-18 12:00:32 +00:00
Frits van Bommel
23db45e99c
Introduce the 'makeArrayRef(...)' family of functions, which fills a similar role for ArrayRef<> as std::make_pair() fills for std::pair<>: they return the right instantiation of ArrayRef<T> based on the types of the parameters.
...
They mostly mirror the ArrayRef constructors, with two exceptions:
* There's no function mirroring the default constructor because it wouldn't have any parameters to deduce the right ArrayRef<T> from.
* There's an explicit SmallVector<T> overload in addition to the SmallVectorImpl<T> overload. Without it, the single-element overload would try to create an ArrayRef<Smallvector<T> > because it's a better match according to the overloading rules. (And both overloads are used in the current tree, so neither is redundant)
llvm-svn: 135389
2011-07-18 11:58:53 +00:00
Chris Lattner
229907cd11
land David Blaikie's patch to de-constify Type, with a few tweaks.
...
llvm-svn: 135375
2011-07-18 04:54:35 +00:00
Chris Lattner
8e8d674d79
add iteration support to TinyPtrVector for clang's use.
...
llvm-svn: 135367
2011-07-18 01:53:11 +00:00
Chris Lattner
7b70bef7c8
fix a warning in TinyPtrVector, adopt it in SSAUpdater, saving some
...
mallocs.
llvm-svn: 135366
2011-07-18 01:43:58 +00:00
Chris Lattner
a8680dced2
introduce a new TinyPtrVector class.
...
llvm-svn: 135365
2011-07-18 01:40:02 +00:00
Jakub Staszak
623e1971ce
Remove "LoopInfo.h" include from BranchProbabilityInfo.h.
...
llvm-svn: 135353
2011-07-16 20:31:15 +00:00
Jakub Staszak
2713117135
Add MachineBlockFrequency analysis.
...
llvm-svn: 135352
2011-07-16 20:23:20 +00:00
Andrew Trick
244e2c3e82
Fix SCEVEXpander to handle arbitrary phi expansion. Includes two
...
related bug fixes and corresponding assertions for uninitialized data
and missing NULL check. Test cases will be included with the new LFTR.
llvm-svn: 135333
2011-07-16 00:59:39 +00:00
Chris Lattner
1d021a9f2a
deconstify getType()'s.
...
llvm-svn: 135323
2011-07-15 23:15:45 +00:00
Jakob Stoklund Olesen
795da1c108
Extract parts of RAGreedy::splitAroundRegion as SplitKit methods.
...
This gets rid of some of the gory splitting details in RAGreedy and
makes them available to future SplitKit clients.
Slightly generalize the functionality to support multi-way splitting.
Specifically, SplitEditor::splitLiveThroughBlock() supports switching
between different register intervals in a block.
llvm-svn: 135307
2011-07-15 21:47:57 +00:00
Benjamin Kramer
e0dda9c1c8
Teach llvm-objdump to disassemble sections symbol by symbol.
...
llvm-svn: 135289
2011-07-15 18:39:24 +00:00
Benjamin Kramer
f6f3e81c07
ObjectFile: Add a method to check whether a section contains a symbol.
...
- No ELF or COFF implementation yet, I don't have a way to test that.
Should be straightforward to add though.
llvm-svn: 135288
2011-07-15 18:39:21 +00:00
Jay Foad
5bd375a6cc
Convert CallInst and InvokeInst APIs to use ArrayRef.
...
llvm-svn: 135265
2011-07-15 08:37:34 +00:00
Jeffrey Yasskin
03b81a2eb4
Add an APFloat::convertToInt(APSInt) function that automatically manages the
...
memory for the result.
llvm-svn: 135259
2011-07-15 07:04:56 +00:00
Chris Lattner
af1783f987
remove the old and dangerous uncheckedReplaceAllUsesWith method,
...
which was just replaceAllUsesWith without some assertions. It was
needed back when type refinement was alive.
llvm-svn: 135253
2011-07-15 06:18:52 +00:00
Chris Lattner
be6610caba
devirtualize Constant::isNullValue:
...
4 files changed, 15 insertions(+), 60 deletions(-)
llvm-svn: 135252
2011-07-15 06:14:08 +00:00
Chris Lattner
ac5fb56682
add CFP::isNegative() and ConstnatInt::isNegative() methods.
...
Devirtualize the isNegativeZeroValue method.
llvm-svn: 135249
2011-07-15 05:58:04 +00:00
Chris Lattner
e983082bdb
remove the InvalidateStructLayoutInfo API, which is dead and unnecessary now
...
that type refinement is toast.
llvm-svn: 135245
2011-07-15 05:21:59 +00:00
Evan Cheng
a83b37a9db
Move some parts of TargetAsmInfo down to MCAsmInfo. This is not the greatest
...
solution but it is a small step towards removing the horror that is
TargetAsmInfo.
llvm-svn: 135237
2011-07-15 02:09:41 +00:00
Evan Cheng
1705ab00ab
Rename createAsmInfo to createMCAsmInfo and move registration code to MCTargetDesc to prepare for next round of changes.
...
llvm-svn: 135219
2011-07-14 23:50:31 +00:00
Devang Patel
4db3844e8b
Add dump()
...
llvm-svn: 135200
2011-07-14 21:50:04 +00:00
Benjamin Kramer
c8dc46bc01
Add a new field to MCOperandInfo that contains information about the type of the Operand.
...
- The actual values are from the MCOI::OperandType enum.
- Teach tblgen to read it from the instruction definition.
- This is a better implementation of the hacks in edis.
llvm-svn: 135197
2011-07-14 21:47:18 +00:00
Rafael Espindola
784ad24bad
Add LLVMConstNamedStruct to the C api to let its users create constants
...
of named struct types.
llvm-svn: 135178
2011-07-14 19:09:08 +00:00
Chris Lattner
7c37b1cf51
The key of a StringMap can contain nul's in it, so having first() return
...
const char* doesn't make sense. Have it return StringRef instead.
llvm-svn: 135167
2011-07-14 18:31:43 +00:00
Chris Lattner
923053a1d6
consolidate GlobalValue::isDeclaration into one
...
non-virtual function.
llvm-svn: 135163
2011-07-14 18:10:41 +00:00
Benjamin Kramer
e6e1933f31
Change Intrinsic::getDeclaration and friends to take an ArrayRef.
...
llvm-svn: 135154
2011-07-14 17:45:39 +00:00
Chris Lattner
17cf05b953
add a couple more missing C api, patch by Vitaly Lugovskiy!
...
llvm-svn: 135151
2011-07-14 16:20:28 +00:00
Chris Lattner
e71ccde249
add C api for hte new type system rewrite API. Patch by Vitaly Lugovskiy!
...
llvm-svn: 135132
2011-07-14 05:53:17 +00:00
Evan Cheng
c7ac690ba2
Unfortunately several files in MC are badly violating layering rule by using
...
TargetAsmInfo, which in turn pulls in TargetRegisterInfo, etc. :-( There are
other cases of violations, but this is probably the worst.
This patch is but one small step towards fixing this. 500 more steps to go. :-(
llvm-svn: 135131
2011-07-14 05:43:07 +00:00
Devang Patel
07d61edc30
Simplify and delay extracting DebugLoc elements, scope and InlinedAt, as much as possible.
...
llvm-svn: 135124
2011-07-14 01:14:57 +00:00
Owen Anderson
651b230ca0
Add a target-indepedent entry to MCInstrDesc to describe the encoded size of an opcode. Switch ARM over to using that rather than its own special MCInstrDesc bits.
...
llvm-svn: 135106
2011-07-13 23:22:26 +00:00
Evan Cheng
2d7faa5e3e
Fix up TargetLoweringObjectFile ctors to properly initialize fields.
...
llvm-svn: 135068
2011-07-13 19:54:59 +00:00
Jim Grosbach
602aa90ab8
Update MCParsedAsmOperand debug methods.
...
Update the debug output interface for MCParsedAsmOperand to have a print()
method which takes an output stream argument, an << operator which invokes
the print method using the given stream, and a dump() method which prints
the operand to the dbgs() stream. This makes the interface more consistent
with the rest of LLVM, and more convenient to use at the debugger command
line.
llvm-svn: 135043
2011-07-13 15:34:57 +00:00
Jay Foad
57aa636794
Convert InsertValueInst and ExtractValueInst APIs to use ArrayRef.
...
llvm-svn: 135040
2011-07-13 10:26:04 +00:00
Jay Foad
00e887b96f
Add some bits that I found useful when converting InsertValueInst and
...
ExtractValueInst APIs to use ArrayRef: a new constructor taking a
(begin, end) range, and operators == and != for element-wise comparison.
llvm-svn: 135039
2011-07-13 09:15:05 +00:00
Danil Malyshev
72510f22b4
Add to RuntimeDyld support different object formats
...
llvm-svn: 135037
2011-07-13 07:57:58 +00:00
Bill Wendling
5d11676eef
There is a cyclic dependency between MC and Target if this method is out-of-line.
...
llvm-svn: 135006
2011-07-12 22:35:01 +00:00
Benjamin Kramer
660e29828b
Delete StructType bodies when destroying a StructType.
...
Leak found by valgrind.
llvm-svn: 134994
2011-07-12 18:22:07 +00:00
Jay Foad
b804a2b751
Second attempt at de-constifying LLVM Types in FunctionType::get(),
...
StructType::get() and TargetData::getIntPtrType().
llvm-svn: 134982
2011-07-12 14:06:48 +00:00
Tobias Grosser
6c3501d5c6
Remove IntegerType constness from TargetData
...
llvm-svn: 134978
2011-07-12 11:36:58 +00:00
Chris Lattner
b1907b2ab0
make the IRBuilder type methods return non-const types.
...
llvm-svn: 134959
2011-07-12 04:14:22 +00:00