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
Bill Wendling
203796ee7a
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
5ad7d33696
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
10c6820ff4
Move getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions for
...
better location welcome).
llvm-svn: 135438
2011-07-18 22:29:13 +00:00
Jeffrey Yasskin
2e0f2a0985
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
561d71ce7b
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
389cb9d8c6
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
320e39de40
various cleanups noticed by Frits
...
llvm-svn: 135396
2011-07-18 16:35:57 +00:00
Chris Lattner
e909e2936b
remove pasto
...
llvm-svn: 135394
2011-07-18 16:04:11 +00:00
Frits van Bommel
107d4e0957
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
6c24f9c277
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
9286081ccc
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
e1fe7061ce
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
009603a6d2
add iteration support to TinyPtrVector for clang's use.
...
llvm-svn: 135367
2011-07-18 01:53:11 +00:00
Chris Lattner
04b988a1c0
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
fde62dcdb7
introduce a new TinyPtrVector class.
...
llvm-svn: 135365
2011-07-18 01:40:02 +00:00
Jakub Staszak
7bd3be24d8
Remove "LoopInfo.h" include from BranchProbabilityInfo.h.
...
llvm-svn: 135353
2011-07-16 20:31:15 +00:00
Jakub Staszak
a0010953f7
Add MachineBlockFrequency analysis.
...
llvm-svn: 135352
2011-07-16 20:23:20 +00:00
Andrew Trick
b2c2eec80d
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
7fc89c5ff8
deconstify getType()'s.
...
llvm-svn: 135323
2011-07-15 23:15:45 +00:00
Jakob Stoklund Olesen
987cd08002
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
5836701780
Teach llvm-objdump to disassemble sections symbol by symbol.
...
llvm-svn: 135289
2011-07-15 18:39:24 +00:00
Benjamin Kramer
5936e08079
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
c826df8fb7
Convert CallInst and InvokeInst APIs to use ArrayRef.
...
llvm-svn: 135265
2011-07-15 08:37:34 +00:00
Jeffrey Yasskin
4d5d3fceaa
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
609591194a
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
6274327fff
devirtualize Constant::isNullValue:
...
4 files changed, 15 insertions(+), 60 deletions(-)
llvm-svn: 135252
2011-07-15 06:14:08 +00:00
Chris Lattner
e99d93799f
add CFP::isNegative() and ConstnatInt::isNegative() methods.
...
Devirtualize the isNegativeZeroValue method.
llvm-svn: 135249
2011-07-15 05:58:04 +00:00
Chris Lattner
aba8e40670
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
1ae06d95e0
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
9e8f90a020
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
369cd5cef5
Add dump()
...
llvm-svn: 135200
2011-07-14 21:50:04 +00:00
Benjamin Kramer
25ffda4d8a
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
e3b7833680
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
5bf752bcf4
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