Rafael Espindola
5e39a6d951
Remove IsExplicit. It was always false.
...
llvm-svn: 118639
2010-11-09 22:37:44 +00:00
Dan Gohman
2a7e94d265
Convert comments to doxygen syntax.
...
llvm-svn: 118628
2010-11-09 20:33:57 +00:00
Dan Gohman
27fb58d9c7
AccessesArgumentsReadonly is read-only.
...
llvm-svn: 118615
2010-11-09 19:50:00 +00:00
Dan Gohman
d50f969460
Add a AccessesArgumentsReadonly ModRefBehavior value, so that the intrinsic
...
property IntrReadArgMem can be modeled.
llvm-svn: 118614
2010-11-09 19:48:55 +00:00
Dan Gohman
9bdf92c92c
Factor out the logic for onlyReadsMemory into a helper function.
...
llvm-svn: 118611
2010-11-09 19:43:24 +00:00
Dan Gohman
3de0bd24db
Delete AccessesArgumentsAndGlobals, which was unused.
...
llvm-svn: 118610
2010-11-09 19:41:37 +00:00
Michael J. Spencer
3ae9fd29ae
System/Path/Windows: Change GetRootDirectory to return file:/// instead of C:/.
...
llvm-svn: 118502
2010-11-09 15:10:45 +00:00
Dan Gohman
227bf9fea9
Add some comments noting some correspondences between ModRefBehavior
...
values, LLVM IR function attributes, and LLVM intrinsic attributes.
llvm-svn: 118455
2010-11-08 23:46:02 +00:00
Devang Patel
af569979a6
Document parameters. Fix typos.
...
llvm-svn: 118424
2010-11-08 18:28:34 +00:00
Dan Gohman
6909ecf66e
Extend the AliasAnalysis::pointsToConstantMemory interface to allow it
...
to optionally look for constant or local (alloca) memory.
Teach BasicAliasAnalysis::pointsToConstantMemory to look through Select
and Phi nodes, and to support looking for local memory.
Remove FunctionAttrs' PointsToLocalOrConstantMemory function, now that
AliasAnalysis knows all the tricks that it knew.
llvm-svn: 118412
2010-11-08 16:45:26 +00:00
Dan Gohman
ee58dba24c
Delete getIntrinsicModRefBehavior. Clients can just use the normal
...
getModRefBehavior now, since it now understands intrinsics as well
as normal functions.
llvm-svn: 118411
2010-11-08 16:11:19 +00:00
Dan Gohman
c3202f8550
Add comments.
...
llvm-svn: 118408
2010-11-08 15:34:42 +00:00
Che-Liang Chiou
4cc802839c
Add registry hook for assembly text output
...
llvm-svn: 118394
2010-11-08 02:21:17 +00:00
Rafael Espindola
fd7a61257b
typos
...
llvm-svn: 118376
2010-11-07 13:48:10 +00:00
Rafael Espindola
49a9710db0
Add method for checking if a path is a symbolic link.
...
llvm-svn: 118367
2010-11-07 04:36:50 +00:00
Rafael Espindola
877bb5ba4b
Relax dwarf line fragments. This fixes a crash in the included testcase.
...
llvm-svn: 118365
2010-11-07 02:07:12 +00:00
Benjamin Kramer
96ac873014
Prune includes.
...
llvm-svn: 118342
2010-11-06 11:45:59 +00:00
Chris Lattner
5d1361e9ed
Reimplement BuildResultOperands to be in terms of the result instruction's
...
operand list instead of the operand list redundantly declared on the alias
or instruction.
With this change, we finally remove the ins/outs list on the alias. Before:
def : InstAlias<(outs GR16:$dst), (ins GR8 :$src),
"movsx $src, $dst",
(MOVSX16rr8W GR16:$dst, GR8:$src)>;
After:
def : InstAlias<"movsx $src, $dst",
(MOVSX16rr8W GR16:$dst, GR8:$src)>;
This also makes the alias mechanism more general and powerful, which will
be exploited in subsequent patches.
llvm-svn: 118329
2010-11-06 07:14:44 +00:00
Jim Grosbach
a98b9ba916
Add '.code 32' assembler directive to MC streamers.
...
llvm-svn: 118309
2010-11-05 22:40:09 +00:00
Jim Grosbach
bbef2c5fcc
MC'ize the '.code 16' and '.thumb_func' ARM directives.
...
llvm-svn: 118301
2010-11-05 22:08:08 +00:00
Jim Grosbach
577ec1fe53
Trailing whitespace.
...
llvm-svn: 118296
2010-11-05 20:41:12 +00:00
Jim Grosbach
a85416eb77
Allow targets to specify the MachO CPUType/CPUSubtype information.
...
llvm-svn: 118288
2010-11-05 18:48:58 +00:00
Jim Grosbach
380e284cf8
Add v5 and v7 ARM CPU subtype values.
...
llvm-svn: 118281
2010-11-05 17:48:05 +00:00
Daniel Dunbar
8f3d8495f5
CrashRecoveryContext: Add RunSafelyOnThread helper function.
...
llvm-svn: 118272
2010-11-05 07:19:09 +00:00
Devang Patel
6c1b802673
Introduce DIBuilder. It is intended to be a front-end friendly interface to emit debuggging information entries in LLVM IR.
...
To create debugging information for a pointer, using DIBUilder front-end just needs
DBuilder.CreatePointerType(Ty, Size);
instead of
DebugFactory.CreateDerivedType(llvm::dwarf::DW_TAG_pointer_type,
TheCU, "", getOrCreateMainFile(),
0, Size, 0, 0, 0, OCTy);
llvm-svn: 118248
2010-11-04 15:01:38 +00:00
Devang Patel
72715ef163
Add getFile() to get DIFile of a DIType.
...
llvm-svn: 118247
2010-11-04 14:56:34 +00:00
Duncan Sands
3bf2a701a5
In the calling convention logic, ValVT is always a legal type,
...
and as such can be represented by an MVT - the more complicated
EVT is not needed. Use MVT for ValVT everywhere.
llvm-svn: 118245
2010-11-04 10:49:57 +00:00
Daniel Dunbar
06d64897d3
System: Add llvm_execute_on_thread, which does what it says.
...
- Primarily useful for running some code with a specified stack size, when
pthreads are available.
llvm-svn: 118222
2010-11-04 01:26:25 +00:00
Mikhail Glushenkov
991857f132
Rename FindExecutable to PrependMainExecutablePath.
...
Makes it more clear that it is just a path manipulation function.
llvm-svn: 118174
2010-11-03 16:14:16 +00:00
Duncan Sands
41edf30895
Simplify uses of MVT and EVT. An MVT can be compared directly
...
with a SimpleValueType, while an EVT supports equality and
inequality comparisons with SimpleValueType.
llvm-svn: 118169
2010-11-03 12:17:33 +00:00
Duncan Sands
4bbe978c7c
Fix a comment typo.
...
llvm-svn: 118168
2010-11-03 11:55:03 +00:00
Duncan Sands
f6e5e02c9b
Inside the calling convention logic LocVT is always a simple
...
value type, so there is no point in passing it around using
an EVT. Use the simpler MVT everywhere. Rather than trying
to propagate this information maximally in all the code that
using the calling convention stuff, I chose to do a mainly
low impact change instead.
llvm-svn: 118167
2010-11-03 11:35:31 +00:00
Evan Cheng
eab7251695
Fix preload instruction isel. Only v7 supports pli, and only v7 with mp extension supports pldw. Add subtarget attribute to denote mp extension support and legalize illegal ones to nothing.
...
llvm-svn: 118160
2010-11-03 06:34:55 +00:00
Evan Cheng
67db408634
Two sets of changes. Sorry they are intermingled.
...
1. Fix pre-ra scheduler so it doesn't try to push instructions above calls to
"optimize for latency". Call instructions don't have the right latency and
this is more likely to use introduce spills.
2. Fix if-converter cost function. For ARM, it should use instruction latencies,
not # of micro-ops since multi-latency instructions is completely executed
even when the predicate is false. Also, some instruction will be "slower"
when they are predicated due to the register def becoming implicit input.
rdar://8598427
llvm-svn: 118135
2010-11-03 00:45:17 +00:00
Dan Gohman
67f95d770b
Factor code out of APInt to form a isUIntN helper function.
...
llvm-svn: 118133
2010-11-03 00:38:40 +00:00
Jakob Stoklund Olesen
ea31f5aadd
Let the -inline-threshold command line argument take precedence over the
...
threshold given to createFunctionInliningPass().
Both opt -O3 and clang would silently ignore the -inline-threshold option.
llvm-svn: 118117
2010-11-02 23:40:26 +00:00
Mikhail Glushenkov
79047e7eb3
appendSuffix: don't append a dot when the suffix is empty.
...
Additionally, move the implementation of appendSuffix to Path.cpp: it is
platform-independent.
llvm-svn: 118089
2010-11-02 22:18:37 +00:00
Rafael Espindola
daf6328eb0
Do relaxations with FT_Org fragments. Fixes the FIXME:
...
// FIXME: We should compute this sooner, we don't want to recurse here, and
// we would like to be more functional.
In MCAssembler::ComputeFragmentSize.
llvm-svn: 118080
2010-11-02 21:38:23 +00:00
Mikhail Glushenkov
4077e2da6f
FindExecutable: remove the executability check.
...
This makes the behaviour of FindExecutable more consistent across platforms, but
I'm not very happy with the name...
llvm-svn: 118049
2010-11-02 20:32:46 +00:00
Mikhail Glushenkov
b1d2a5ac52
Make FindProgramByName return paths with slashes unmodified on Windows.
...
This makes its behaviour more consistent across platforms.
llvm-svn: 118048
2010-11-02 20:32:39 +00:00
Mikhail Glushenkov
c86f1d26e9
Path: Add GetEXESuffix() to complement GetDLLSuffix().
...
llvm-svn: 118042
2010-11-02 20:32:26 +00:00
Rafael Espindola
1db6a21aff
Add support for expressions in .sleb/.uleb directives.
...
llvm-svn: 118023
2010-11-02 17:22:24 +00:00
Duncan Sands
47a8976f28
Fix comment typo.
...
llvm-svn: 118016
2010-11-02 15:12:48 +00:00
Duncan Sands
1651d8cdb3
Add some comments explaining what MVT and EVT are, and how they differ.
...
llvm-svn: 118014
2010-11-02 13:57:09 +00:00
Duncan Sands
c56946f7c5
Remove trailing whitespace.
...
llvm-svn: 118013
2010-11-02 13:43:07 +00:00
Jim Grosbach
8b64800473
Tweak to fix spelling and grammar in comment.
...
llvm-svn: 117985
2010-11-02 00:13:15 +00:00
Rafael Espindola
5571ce5ed4
Move EmitInstruction to MCObjectStreamer so that ELF and MachO can share it.
...
llvm-svn: 117925
2010-11-01 16:27:31 +00:00
Rafael Espindola
7a38cb0144
Implement .weakref.
...
llvm-svn: 117911
2010-11-01 14:28:48 +00:00
Chris Lattner
d57d9e862d
eliminate the old InstFormatName which is always "AsmString",
...
simplify CodeGenInstruction. No functionality change.
llvm-svn: 117891
2010-11-01 02:15:23 +00:00
Chandler Carruth
4d8fbad207
Add a specialization for 'long', a hole in the set of fundamental
...
specializations provided here. This is a little annoying because its size
changes from platform to platform. If possible, I may follow up with a patch
that uses standard constants to simplify much of this, but assuming for now
that was avoided for a reason.
llvm-svn: 117880
2010-10-31 22:57:03 +00:00
Nicolas Geoffray
6889997474
Attach a GCModuleInfo to a MachineFunction.
...
llvm-svn: 117867
2010-10-31 20:38:38 +00:00
Chris Lattner
8aaac91ca4
sketch out the planned instruction alias mechanism, add some comments about
...
how the push/pop mnemonic aliases are wrong.
llvm-svn: 117857
2010-10-31 18:43:46 +00:00
Duncan Sands
812f6878ea
Explain the return value of CCAssignFn.
...
llvm-svn: 117854
2010-10-31 10:29:14 +00:00
Rafael Espindola
660b7f5c4a
Add support for files with more than 65280 sections. No testcase since
...
it would be a bit too big :-)
llvm-svn: 117849
2010-10-31 00:16:26 +00:00
Chris Lattner
49227ad505
Resolve a terrible hack in tblgen: instead of hardcoding
...
"In32BitMode" and "In64BitMode" into tblgen, allow any
predicate that inherits from AssemblerPredicate.
llvm-svn: 117831
2010-10-30 19:38:20 +00:00
Chris Lattner
15e92ddd01
Implement (and document!) support for MnemonicAlias's to have Requires
...
directives, allowing things like this:
def : MnemonicAlias<"pop", "popl">, Requires<[In32BitMode]>;
def : MnemonicAlias<"pop", "popq">, Requires<[In64BitMode]>;
Move the rest of the X86 MnemonicAliases over to the .td file.
llvm-svn: 117830
2010-10-30 19:23:13 +00:00
Chris Lattner
7c61e4bca2
implement (and document!) the first kind of MC assembler alias, which
...
just remaps one mnemonic to another. Convert a few of the X86 aliases
from .cpp to .td code.
llvm-svn: 117815
2010-10-30 17:36:36 +00:00
Jim Grosbach
ddf6d9ec2f
80 columns.
...
llvm-svn: 117784
2010-10-30 13:46:39 +00:00
Chris Lattner
ee8dea6453
Rename alignof -> alignOf to avoid irritating C++'0x compilers,
...
PR8423, patch by nobled.
llvm-svn: 117774
2010-10-30 05:14:01 +00:00
Jakob Stoklund Olesen
0ab92619d0
Add SkipPHIsAndLabels from PHIElimination to MachineBasicBlock. It is needed
...
elsewhere.
llvm-svn: 117763
2010-10-30 01:26:14 +00:00
John Thompson
771289ca4a
Mult-alt constraint incremental development step 3.
...
llvm-svn: 117746
2010-10-29 23:37:38 +00:00
John Thompson
6115a7f1d4
Inline asm multiple alternative constraints development phase 2 - improved basic logic, added initial platform support.
...
llvm-svn: 117667
2010-10-29 17:29:13 +00:00
Dan Gohman
b27988e5bd
Make Program::Wait differentiate execution failure due to the file
...
being not found from the file being not executable.
llvm-svn: 117664
2010-10-29 16:54:25 +00:00
Devang Patel
43516e02b6
Simplify.
...
- DIFile F = getFieldAs<DIFile>(6);
- return F.getDirectory();
+ return getFieldAs<DIFile>(6).getDirectory();
llvm-svn: 117662
2010-10-29 16:42:37 +00:00
Jakob Stoklund Olesen
1210a5145a
Print out the connected components in the verifier after complaining about their
...
multiplicity.
llvm-svn: 117630
2010-10-29 00:40:57 +00:00
Devang Patel
c40ecb9302
Fix indentation.
...
llvm-svn: 117601
2010-10-28 20:41:11 +00:00
Devang Patel
504232300c
Backward compatibility. Gracefully handle older versions of debug info.
...
llvm-svn: 117595
2010-10-28 20:08:13 +00:00
Devang Patel
a496603faf
Do not work too hard to find type's file info. There is a special field to record file info.
...
llvm-svn: 117588
2010-10-28 19:50:08 +00:00
Devang Patel
552a3a845c
Fix indentation.
...
llvm-svn: 117586
2010-10-28 19:40:13 +00:00
Mikhail Glushenkov
6aa7a4c180
80-col violations.
...
llvm-svn: 117580
2010-10-28 19:32:47 +00:00
Devang Patel
dcabf6f76a
Do not rely on context to find file info. It is already provided as a separate field.
...
llvm-svn: 117577
2010-10-28 19:14:28 +00:00
Rafael Espindola
1d1ff5485c
Implement TLSLD.
...
llvm-svn: 117547
2010-10-28 15:02:40 +00:00
Rafael Espindola
8372247e83
Implement DTPOFF.
...
llvm-svn: 117546
2010-10-28 14:48:59 +00:00
Rafael Espindola
c44c5b374a
Implement TLSLDM.
...
llvm-svn: 117544
2010-10-28 14:37:09 +00:00
Rafael Espindola
d8ef67f8b9
Implement VK_GOTNTPOFF and switch RelocNeedsGOT to use VariantKind.
...
llvm-svn: 117543
2010-10-28 14:22:44 +00:00
Rafael Espindola
68ec803155
Add support for R_386_TLS_GD, R_386_TLS_LE_32, R_386_TLS_IE and R_386_TLS_LE.
...
llvm-svn: 117494
2010-10-27 21:23:52 +00:00
Devang Patel
6c3a77ab58
Give a name to nameless argument.
...
llvm-svn: 117468
2010-10-27 18:08:31 +00:00
Mikhail Glushenkov
64c0814208
It is confusing to call a random-access iterator 'InputIterator'.
...
llvm-svn: 117441
2010-10-27 07:39:54 +00:00
Mikhail Glushenkov
a52646c12e
Trailing whitespace.
...
llvm-svn: 117440
2010-10-27 07:39:48 +00:00
Dale Johannesen
e7f07349e4
Use a MemIntrinsicSDNode for ISD::PREFETCH, which touches
...
memory, so a MachineMemOperand is useful (not propagated
into the MachineInstr yet). No functional change except
for dump output.
llvm-svn: 117413
2010-10-26 23:11:10 +00:00
Jakob Stoklund Olesen
3a4c0c13eb
Teach MachineBasicBlock::print() to annotate instructions and blocks with
...
SlotIndexes when available.
llvm-svn: 117392
2010-10-26 20:21:46 +00:00
Evan Cheng
324e678bb7
Use instruction itinerary to determine what instructions are 'cheap'.
...
llvm-svn: 117348
2010-10-26 02:08:50 +00:00
Jakob Stoklund Olesen
3988c3fb55
Make the spiller responsible for updating the LiveStacks analysis.
...
llvm-svn: 117337
2010-10-26 00:11:33 +00:00
Devang Patel
fa145a94d1
Simplify.
...
Do not count use of sdisel for single call instruction.
llvm-svn: 117316
2010-10-25 21:31:46 +00:00
Devang Patel
206643ef76
Update SelectBasicBlock signature. This should have been committed with r117310.
...
llvm-svn: 117312
2010-10-25 21:04:12 +00:00
Rafael Espindola
5748458e7d
Add support for emitting ARM file attributes.
...
llvm-svn: 117275
2010-10-25 17:50:35 +00:00
Charles Davis
42270b5d54
Add a new 'hotpatch' attribute. This attribute will insert a two-byte no-op
...
instruction at the beginning of each function that has the attribute, allowing
the function to be easily hooked and/or patched.
llvm-svn: 117264
2010-10-25 15:37:09 +00:00
Tobias Grosser
a0a36f64c6
Reference RegionPass to stop it being eliminated.
...
Contributed by: ether
llvm-svn: 117263
2010-10-25 15:36:50 +00:00
Duncan Sands
cfdc3382c9
Remove deprecated macro names. Hopefully this will unbreak the
...
smooshlab build. The breakage seems to be due to a collision
between LLVM's ATTRIBUTE_UNUSED and gcc's which was previously
hidden due to header files being included in a lucky order.
llvm-svn: 117260
2010-10-25 12:47:22 +00:00
Benjamin Kramer
86b0370b66
SmallVectorize.
...
llvm-svn: 117213
2010-10-23 17:10:24 +00:00
Chandler Carruth
7dd652736f
Move the remaining attribute macros to systematic names based on the attribute
...
name and prefixed with 'LLVM_'.
llvm-svn: 117203
2010-10-23 08:40:19 +00:00
Chandler Carruth
7799a873bb
Switch attribute macros to use 'LLVM_' as a prefix. We retain the old names
...
until other LLVM projects using these are cleaned up.
llvm-svn: 117200
2010-10-23 08:10:43 +00:00
Andrew Trick
7a1dadd47d
This is a prototype of an experimental register allocation
...
framework. It's purpose is not to improve register allocation per se,
but to make it easier to develop powerful live range splitting. I call
it the basic allocator because it is as simple as a global allocator
can be but provides the building blocks for sophisticated register
allocation with live range splitting.
A minimal implementation is provided that trivially spills whenever it
runs out of registers. I'm checking in now to get high-level design
and style feedback. I've only done minimal testing. The next step is
implementing a "greedy" allocation algorithm that does some register
reassignment and makes better splitting decisions.
llvm-svn: 117174
2010-10-22 23:09:15 +00:00
Evan Cheng
20b70697bb
Transfer implicit ops when forming load multiple and return instructions.
...
llvm-svn: 117151
2010-10-22 21:29:58 +00:00
Michael J. Spencer
81bb7d4ad7
I hate line endings.
...
llvm-svn: 117132
2010-10-22 19:14:39 +00:00
Michael J. Spencer
8daaefa006
Endian: Get rid of LLVM_IS_HOST_BIG_ENDIAN.
...
llvm-svn: 117124
2010-10-22 18:45:12 +00:00
Wesley Peck
488027efa3
Making the e_machine configurable by the target backend in ELFObjectWriter.
...
llvm-svn: 117099
2010-10-22 15:52:49 +00:00
Michael J. Spencer
93269f7395
Rename LLVM_IS_TARGET_BIG_ENDIAN to LLVM_IS_HOST_BIG_ENDIAN to reflect what it actually means.
...
llvm-svn: 117092
2010-10-22 08:47:28 +00:00
Michael J. Spencer
b9734a5b12
Support: Add Endian.h
...
llvm-svn: 117057
2010-10-21 20:28:21 +00:00
Duncan Sands
acbc34528c
Fix the cleanup process of exception information in JIT. Now JIT
...
deregisters registered by it FDE structures allowing consecutive
JIT runs to succeed. Patch by Yuri. Fixes PR8285.
llvm-svn: 117004
2010-10-21 08:57:29 +00:00