Wesley Peck
00cc1b6983
Adding the EM_MBLAZE value to the machine architectures enumeration to
...
support future ELF file generation by the MBlaze backend.
llvm-svn: 116985
2010-10-21 02:52:59 +00:00
Michael J. Spencer
b9cffadc06
CodeGen-Windows: Only emit _fltused if a VarArg function is called with floating point args.
...
This should be the minimum set of functions that could possibly need it.
llvm-svn: 116978
2010-10-21 00:08:21 +00:00
Owen Anderson
9e9ae1b048
Attempt to fix valgrind complaining about (benign) leaks in pass registration by having PassRegistry
...
delete PassInfo objects that were created using new-style initialization.
llvm-svn: 116959
2010-10-20 22:22:30 +00:00
Dale Johannesen
58fe3193a6
Remove Synthesizable from the Type system; as MMX vector
...
types are no longer Legal on X86, we don't need it.
No functional change. 8499854.
llvm-svn: 116947
2010-10-20 21:32:10 +00:00
Chandler Carruth
7763c845be
Add a comment about ATTRIBUTE_UNUSED to avoid further confusion over when to
...
use it.
llvm-svn: 116920
2010-10-20 08:44:27 +00:00
Tobias Grosser
88ce93b0eb
Add RegionPass support.
...
A RegionPass is executed like a LoopPass but on the regions detected by the
RegionInfo pass instead of the loops detected by the LoopInfo pass.
llvm-svn: 116905
2010-10-20 01:54:44 +00:00
Dan Gohman
c781a28a1d
Make CodeGen TBAA-aware.
...
llvm-svn: 116890
2010-10-20 00:31:05 +00:00
Jim Grosbach
b390dd1bd5
Spelling typo fix. s/incput/input/. Thanks, Bob!
...
llvm-svn: 116880
2010-10-19 23:39:23 +00:00
Jim Grosbach
a8c0be5343
Add a pre-dispatch SjLj EH hook on the unwind edge for targets to do any
...
setup they require. Use this for ARM/Darwin to rematerialize the base
pointer from the frame pointer when required. rdar://8564268
llvm-svn: 116879
2010-10-19 23:27:08 +00:00
Dan Gohman
399ef0b44a
Move NoAA out of BasicAliasAnalysis.cpp into its own file, now that
...
it doesn't have a special relationship with BasicAliasAnalysis
anymore.
llvm-svn: 116876
2010-10-19 23:09:08 +00:00
Dan Gohman
befe1767ff
Reapply r116831 and r116839, converting AliasAnalysis to use
...
uint64_t, plus fixes for places I missed before.
llvm-svn: 116875
2010-10-19 22:54:46 +00:00
Douglas Gregor
a598c0fbce
Extend StringRef's edit-distance algorithm to permit an upper bound on the allowed edit distance
...
llvm-svn: 116867
2010-10-19 22:13:48 +00:00
Dan Gohman
de3c49438f
Revert r116831 and r116839, which are breaking selfhost builds.
...
llvm-svn: 116858
2010-10-19 21:06:16 +00:00
Jakob Stoklund Olesen
02d7f65c49
Shrink MachineOperand from 40 to 32 bytes on 64-bit hosts.
...
Pull an unsigned out of the Contents union such that it has the same size as two
pointers and no padding.
Arrange members such that the Contents union and all pointers can be 8-byte
aligned without padding.
This speeds up code generation by 0.8% on a 64-bit host. 32-bit hosts should be
unaffected.
llvm-svn: 116857
2010-10-19 20:56:32 +00:00
Owen Anderson
933c8cc6ed
Remove extraneous slash.
...
llvm-svn: 116851
2010-10-19 19:54:48 +00:00
Evan Cheng
1c8dafd12a
Re-enable register pressure aware machine licm with fixes. Hoist() may have
...
erased the instruction during LICM so UpdateRegPressureAfter() should not
reference it afterwards.
llvm-svn: 116845
2010-10-19 18:58:51 +00:00
Dan Gohman
37a9b813f5
Oops, check in all the files for converting AliasAnalysis to
...
use uint64_t.
llvm-svn: 116839
2010-10-19 18:08:27 +00:00
Owen Anderson
65610b8589
Factor out the call-once implementation into its own macro.
...
llvm-svn: 116832
2010-10-19 18:02:06 +00:00
Owen Anderson
46990c17f7
Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which
...
must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize
the pass's dependencies.
Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.
I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems
with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass
registration/creation, please send the testcase to me directly.
llvm-svn: 116820
2010-10-19 17:21:58 +00:00
Daniel Dunbar
6ff550c84d
Revert r116781 "- Add a hook for target to determine whether an instruction def
...
is", which breaks some nightly tests.
llvm-svn: 116816
2010-10-19 17:14:24 +00:00
Mikhail Glushenkov
0c09a4b97f
GlobalOpt: EvaluateFunction() must not evaluate stores to weak_odr globals.
...
Fixes PR8389.
llvm-svn: 116812
2010-10-19 16:47:23 +00:00
Mikhail Glushenkov
e0b70cf701
Trailing whitespace.
...
llvm-svn: 116811
2010-10-19 16:47:15 +00:00
Chandler Carruth
3f16e8b729
First step to allowing the resource directory of Clang to be adjusted for
...
strange packaging environments. The primary result of this is to expose
a (normally empty) CLANG_RESOURCE_DIR string in the autoconf and CMake builds.
This will in turn be used by a subsequent commit to Clang.
Regenerated configure and config.h.in thanks to Nick. =D
llvm-svn: 116802
2010-10-19 08:21:25 +00:00
Evan Cheng
9c3f6f486e
- Add a hook for target to determine whether an instruction def is
...
"long latency" enough to hoist even if it may increase spilling. Reloading
a value from spill slot is often cheaper than performing an expensive
computation in the loop. For X86, that means machine LICM will hoist
SQRT, DIV, etc. ARM will be somewhat aggressive with VFP and NEON
instructions.
- Enable register pressure aware machine LICM by default.
llvm-svn: 116781
2010-10-19 00:55:07 +00:00
Chandler Carruth
755dd8000d
Move the definition of this to the source file to anchor the vtable.
...
llvm-svn: 116779
2010-10-19 00:37:30 +00:00
Dan Gohman
8b332ffb8c
Make the representation of AliasSets explicitly differentiate
...
between "not known yet" and "known no tbaa info" so that it
can merge them properly.
llvm-svn: 116767
2010-10-18 23:31:47 +00:00
Chandler Carruth
524faec5da
Add a virtual destructor to silence a GCC warning.
...
llvm-svn: 116766
2010-10-18 23:18:51 +00:00
Dan Gohman
6efd04961b
Don't pass the raw invalid pointer used to represent conflicting
...
TBAA information to AliasAnalysis.
llvm-svn: 116751
2010-10-18 21:28:00 +00:00
Bill Wendling
3b3d9aaa86
Don't recompute MachineRegisterInfo in the Optimize* method.
...
llvm-svn: 116750
2010-10-18 21:22:31 +00:00
Dan Gohman
64affb7be2
Make AliasSetTracker TBAA-aware, enabling TBAA-enabled LICM.
...
llvm-svn: 116743
2010-10-18 20:44:50 +00:00
Dan Gohman
df5c887e86
Add TypeBasedAliasAnalysis to the standard pass lists. Note that it
...
is currently inert by default.
llvm-svn: 116732
2010-10-18 18:50:27 +00:00
Dan Gohman
6aff5b94ff
Make BasicAliasAnalysis a normal AliasAnalysis implementation which
...
does normal initialization and normal chaining. Change the default
AliasAnalysis implementation to NoAlias.
Update StandardCompileOpts.h and friends to explicitly request
BasicAliasAnalysis.
Update tests to explicitly request -basicaa.
llvm-svn: 116720
2010-10-18 18:04:47 +00:00
Rafael Espindola
be5c52d2dc
Add a MCObjectFormat class so that code common to all targets that use a
...
single object format can be shared.
This also adds support for
mov zed+(bar-foo), %eax
on ELF and COFF targets.
llvm-svn: 116675
2010-10-16 18:23:53 +00:00
Michael J. Spencer
f9a7c39ecc
MC-COFF: Add support for default-null weak externals.
...
llvm-svn: 116666
2010-10-16 08:25:57 +00:00
Michael J. Spencer
e57b670425
X86-Windows: Emit an undefined global __fltused symbol when targeting Windows
...
if any floating point arguments are passed to an external function.
llvm-svn: 116665
2010-10-16 08:25:41 +00:00
Michael J. Spencer
16ad2c129c
Whitespace!
...
llvm-svn: 116664
2010-10-16 08:25:21 +00:00
Jim Grosbach
9e98b1cde0
Grammar.
...
llvm-svn: 116557
2010-10-15 01:44:59 +00:00
Francois Pichet
ad0548d742
Always use binary mode for output stream. This is important to prevent unwanted end of line conversion on Windows. Should not affect Unix where O_BINARY is not defined. This fix /clang/test/lexer/preamble.c XFAIL on WIN32.
...
llvm-svn: 116509
2010-10-14 20:30:58 +00:00
Owen Anderson
467d56737b
Try again at implementing thread-safe lazy pass initialization, without depending on static local initialization
...
being threadsafe AND ensuring that initialization is complete by the time the initializeFooPass method returns.
llvm-svn: 116492
2010-10-14 17:59:03 +00:00
Owen Anderson
5114ec184e
Revert r116489. It included some changes I didn't intend to commit, and broke the buildbots.
...
llvm-svn: 116491
2010-10-14 17:36:50 +00:00
Owen Anderson
2928dbea72
Apparently MSVC doesn't support thread-safe static local initialization. Roll our own solution instead.
...
llvm-svn: 116489
2010-10-14 17:26:06 +00:00
Chris Lattner
451a0accb5
add uadd_ov/usub_ov to apint, consolidate constant folding
...
logic to use the new APInt methods. Among other things this
implements rdar://8501501 - llvm.smul.with.overflow.i32 should constant fold
which comes from "clang -ftrapv", originally brought to my attention from PR8221.
llvm-svn: 116457
2010-10-14 00:05:07 +00:00
Chris Lattner
365326538a
missed a line :(
...
llvm-svn: 116456
2010-10-13 23:57:00 +00:00
Chris Lattner
093d5fe0a9
constify these methods.
...
llvm-svn: 116455
2010-10-13 23:54:10 +00:00
Chris Lattner
70a78ab2c5
add a few operations for signed operations that also
...
return an overflow flag.
llvm-svn: 116452
2010-10-13 23:46:33 +00:00
Owen Anderson
2ea9b016d8
Conversely, Analysis-implementations do NOT need to initialize the AnalysisGroup. It will only matter when
...
someone tries to require that AG, in which case it is the requester's responsibility to initialize it.
llvm-svn: 116442
2010-10-13 21:55:07 +00:00
Owen Anderson
c65395a991
Analysis groups need to initialize their default implementations.
...
llvm-svn: 116441
2010-10-13 21:49:58 +00:00
Owen Anderson
63b480c711
Take advantage of C++'s thread-safe static local initialization to simplify thread-safe pass initialization.
...
llvm-svn: 116426
2010-10-13 20:24:34 +00:00
Benjamin Kramer
3d87b36b64
Remove noisy semicolon.
...
llvm-svn: 116407
2010-10-13 15:55:12 +00:00
Tobias Grosser
70507511ae
Add Region::isTopLevelRegion().
...
llvm-svn: 116402
2010-10-13 11:02:44 +00:00
Tobias Grosser
85dce73ab5
RegionInfo: Update RegionInfo after a BB was split.
...
llvm-svn: 116398
2010-10-13 05:54:13 +00:00
Tobias Grosser
6aac855519
RegioInfo: Add getExpandedRegion().
...
getExpandedRegion() enables us to create non canonical regions. Those regions
can be used to define the largerst region, that fullfills a certain property.
llvm-svn: 116397
2010-10-13 05:54:11 +00:00
Tobias Grosser
ecfaf92c1a
RegionInfo: Allow to update exit and entry of a region.
...
llvm-svn: 116396
2010-10-13 05:54:10 +00:00
Tobias Grosser
84dd4b54fc
RegionInfo: Enhance addSubregion.
...
llvm-svn: 116395
2010-10-13 05:54:09 +00:00
Tobias Grosser
a2b5df5a6d
RegionInfo: Allow to set the parent region of a basic block.
...
llvm-svn: 116394
2010-10-13 05:54:07 +00:00
Rafael Espindola
16d5617ec3
Fix PR8313 by changing ValueToValueMap use a TrackingVH.
...
llvm-svn: 116390
2010-10-13 02:08:17 +00:00
Rafael Espindola
aa5448f520
Be more consistent in using ValueToValueMapTy.
...
llvm-svn: 116387
2010-10-13 01:36:30 +00:00
Owen Anderson
63f757463c
Begin adding static dependence information to passes, which will allow us to
...
perform initialization without static constructors AND without explicit initialization
by the client. For the moment, passes are required to initialize both their
(potential) dependencies and any passes they preserve. I hope to be able to relax
the latter requirement in the future.
llvm-svn: 116334
2010-10-12 19:48:12 +00:00
Jim Grosbach
d18b416075
Comment grammar tweakage.
...
llvm-svn: 116322
2010-10-12 18:11:41 +00:00
Dan Gohman
d904add908
Initial va_arg support for x86-64. Patch by David Meyer!
...
llvm-svn: 116319
2010-10-12 18:00:49 +00:00
Dan Gohman
c49d367fb9
Constify.
...
llvm-svn: 116277
2010-10-12 00:12:29 +00:00
Dan Gohman
dbb5a62aba
Use SmallVectorImpl in a bunch of places.
...
llvm-svn: 116276
2010-10-12 00:11:18 +00:00
Jason W Kim
59375bae75
Second set of ARM/MC/ELF changes.
...
Added ARM specific ELF section types.
Added AttributesSection to ARMElfTargetObject
First step in unifying .cpu assembly tag with ELF/.o
llc now asserts on actual ELF emission on -filetype=obj :-)
llvm-svn: 116257
2010-10-11 23:01:44 +00:00
Dan Gohman
68f316a93c
Clang's #include handling apparently doesn't work for libstdc++'s
...
fenv.h. See PR6907 for details. Work around this in FEnv.h to fix
the seflhost build.
llvm-svn: 116256
2010-10-11 22:30:59 +00:00
Michael J. Spencer
0888ccaa19
System: Add SwapByteOrder and update Support/MathExtras.h to use it.
...
This time correctly.
llvm-svn: 116247
2010-10-11 21:56:16 +00:00
Michael J. Spencer
0af3659b5d
Revert "System: Add SwapByteOrder and update Support/MathExtras.h to use it."
...
This reverts commit 116234.
It compiled just fine with MSVC and clang...
llvm-svn: 116242
2010-10-11 21:39:24 +00:00
Michael J. Spencer
d0d6c9b01e
System: Add SwapByteOrder and update Support/MathExtras.h to use it.
...
llvm-svn: 116234
2010-10-11 21:22:22 +00:00
Chris Lattner
d60c4c8a13
remove dead prototype, PR8351
...
llvm-svn: 116209
2010-10-11 17:44:22 +00:00
Chris Lattner
f97743c49d
tweak comment.
...
llvm-svn: 116192
2010-10-11 05:48:00 +00:00
Chris Lattner
c9709f154d
Per discussion with Sanjiv, remove the PIC16 target from mainline. When/if
...
it comes back, it will be largely a rewrite, so keeping the old codebase
in tree isn't helping anyone.
llvm-svn: 116190
2010-10-11 05:44:40 +00:00
Kenneth Uildriks
e9771f15f7
Now using a variant of the existing inlining heuristics to decide whether to create a given specialization of a function in PartialSpecialization. If the total performance bonus across all callsites passing the same constant exceeds the specialization cost, we create the specialization.
...
llvm-svn: 116158
2010-10-09 22:06:36 +00:00
Jim Grosbach
b328f0ab04
Allow << streaming of MCOperand.
...
llvm-svn: 116107
2010-10-08 21:36:13 +00:00
Kenneth Uildriks
0545afa8fd
Start separating out code metrics into code size metrics and code performance metrics. Partial Specialization will apply the former to function specializations, and the latter to all callsites that can use a specialization, in order to decide whether to create a specialization
...
llvm-svn: 116057
2010-10-08 13:57:31 +00:00
Michael J. Spencer
bdf3b8770f
MC-COFF: Fix Simple and Complex type. Fixes PR8320.
...
llvm-svn: 116037
2010-10-08 03:17:11 +00:00
Michael J. Spencer
fc3f9d7c92
Fix Whitespace.
...
llvm-svn: 116036
2010-10-08 03:16:56 +00:00
Jakob Stoklund Olesen
1d81101e97
After splitting, the remaining LiveInterval may be fragmented into multiple
...
connected components. These components should be allocated different virtual
registers because there is no reason for them to be allocated together.
Add the ConnectedVNInfoEqClasses class to calculate the connected components,
and move values to new LiveIntervals.
Use it from SplitKit::rewrite by creating new virtual registers for the
components.
llvm-svn: 116006
2010-10-07 23:34:34 +00:00
Devang Patel
35201e0fd6
Remove LoopIndexSplit pass. It is neither maintained nor used by anyone.
...
llvm-svn: 116004
2010-10-07 23:29:37 +00:00
Owen Anderson
69cbf2e8b7
Now with fewer extraneous semicolons!
...
llvm-svn: 115996
2010-10-07 22:25:06 +00:00
Devang Patel
ee23e6ea23
Provie a clearner interface so that FE can decide whether a function has prototype or not.
...
llvm-svn: 115988
2010-10-07 22:03:01 +00:00
Jim Grosbach
ea4028ac17
Add output stream operator for MCInst.
...
llvm-svn: 115974
2010-10-07 20:38:37 +00:00
Dan Gohman
6645ce3f75
Move tool_output_file into its own file.
...
llvm-svn: 115973
2010-10-07 20:32:40 +00:00
Owen Anderson
d07798cef0
Add initialization routines for Instrumentation.
...
llvm-svn: 115971
2010-10-07 20:17:24 +00:00
Owen Anderson
8adf6f2759
Add initialization routines to InstCombine.
...
llvm-svn: 115965
2010-10-07 20:04:55 +00:00
Owen Anderson
c49384836e
Add initialization routines for VMCore.
...
llvm-svn: 115963
2010-10-07 19:51:21 +00:00
Owen Anderson
26a89851fe
Add initialization routines for Target.
...
llvm-svn: 115957
2010-10-07 18:50:11 +00:00
Owen Anderson
2dd4609c9e
Add initialization routines for CodeGen.
...
llvm-svn: 115949
2010-10-07 18:41:20 +00:00
Owen Anderson
704998fa6f
Add initialization routines for Analysis and IPA.
...
llvm-svn: 115946
2010-10-07 18:31:00 +00:00
Owen Anderson
ec9ec036a4
Add an initialization routine for libLLVMipo.a
...
llvm-svn: 115933
2010-10-07 18:09:59 +00:00
Owen Anderson
f7f45af8ae
Add a header that I forgot to commit.
...
llvm-svn: 115932
2010-10-07 18:05:11 +00:00
Owen Anderson
4a9acfa34a
Next step on the getting-rid-of-static-ctors train: begin adding per-library
...
initialization functions that initialize the set of passes implemented in
that library. Add C bindings for these functions as well.
llvm-svn: 115927
2010-10-07 17:55:47 +00:00
Owen Anderson
88fd2662d2
Add the header that I accidentally forgot from r115900.
...
llvm-svn: 115901
2010-10-07 04:17:38 +00:00
Owen Anderson
a8a7bf484f
Move the pass initialization helper functions into the llvm namespace, and add
...
a header declaring them all. This is also where we will declare per-library pass-set
initializer functions down the road.
llvm-svn: 115900
2010-10-07 04:13:08 +00:00
Chris Lattner
2ccb760de0
add a common SDPatternOperator base class to SDNode and PatFrag for
...
stuff that wants to take one or the other. These can both be used
as the operation of a dag in a pattern match.
llvm-svn: 115877
2010-10-07 00:01:00 +00:00
Jakob Stoklund Olesen
6b4557461f
Add MachineRegisterInfo::constrainRegClass and use it in MachineCSE.
...
This function is intended to be used when inserting a machine instruction that
trivially restricts the legal registers, like LEA requiring a GR32_NOSP
argument.
llvm-svn: 115875
2010-10-06 23:54:39 +00:00
Owen Anderson
2a670815f6
Hide analysis group registration behind a macro, just like pass registration.
...
llvm-svn: 115835
2010-10-06 21:02:27 +00:00
Devang Patel
eeb0b64560
Add support for DW_TAG_unspecified_parameters.
...
llvm-svn: 115833
2010-10-06 20:50:40 +00:00
Michael J. Spencer
820fe774b4
Cleanup Whitespace.
...
llvm-svn: 115829
2010-10-06 20:36:38 +00:00
Owen Anderson
123f4e5c19
Pass initialization functions should take a PassRegistry as a parameter
...
rather than being fixed to the global registry.
llvm-svn: 115824
2010-10-06 20:07:03 +00:00
Dan Gohman
149f643d1a
Remove compatibilty code for old-style multiple return values.
...
llvm-svn: 115799
2010-10-06 16:59:24 +00:00
Dan Gohman
57f707c6a7
ComputeLinearIndex doesn't need its TLI argument.
...
llvm-svn: 115792
2010-10-06 16:18:29 +00:00
Dan Gohman
52980b97f9
Constify isReachableFromEntry.
...
llvm-svn: 115788
2010-10-06 15:49:14 +00:00
Bill Wendling
179ecd5159
Remove tabs.
...
llvm-svn: 115764
2010-10-06 07:19:18 +00:00
Evan Cheng
6fbb6dea7c
- Add TargetInstrInfo::getOperandLatency() to compute operand latencies. This
...
allow target to correctly compute latency for cases where static scheduling
itineraries isn't sufficient. e.g. variable_ops instructions such as
ARM::ldm.
This also allows target without scheduling itineraries to compute operand
latencies. e.g. X86 can return (approximated) latencies for high latency
instructions such as division.
- Compute operand latencies for those defined by load multiple instructions,
e.g. ldm and those used by store multiple instructions, e.g. stm.
llvm-svn: 115755
2010-10-06 06:27:31 +00:00
Bill Wendling
ef718b99d4
Provide a fast "get me the target triple from the module" API. This can
...
drastically reduce the linking time during LTO.
Patch by Shantonu Sen!
llvm-svn: 115728
2010-10-06 01:22:42 +00:00
Owen Anderson
38e84dd7ea
Another step towards getting rid of static ctors for pass registration: have INITIALIZE_PASS AND INITIALIZE_AG_PASS
...
expand to an initializeMyPass() function (in additional to the extant static ctors). Eventually, these will be called
from a big InitializeAllPasses() function, and the PassInfo's they create (which would be leaked if this code were used
at the moment) will be handed off to a PassRegistry for ownership.
llvm-svn: 115703
2010-10-05 22:58:16 +00:00
Rafael Espindola
5f53528867
On ELF we need to know which symbols are used in relocations to decide if
...
they should be in the symbol table or not. Instead of "guessing", just compute
the symbol table after the relocations are known.
llvm-svn: 115619
2010-10-05 15:11:03 +00:00
Michael J. Spencer
2d26a21128
Support: Add __forceinline to Compiler.h on MSVC.
...
llvm-svn: 115595
2010-10-05 06:00:52 +00:00
Bill Wendling
b94ade249a
The pshufw instruction came about in MMX2 when SSE was introduced. Don't place
...
it in with the SSSE3 instructions.
Steward! Could you place this chair by the aft sun deck? I'm trying to get away
from the Astors. They are such boors!
llvm-svn: 115552
2010-10-04 20:24:01 +00:00
Kevin Enderby
01b93a4319
Incorporate suggestions by Daniel Dunbar after his review. Thanks Daniel!
...
1) Changed ValidateDwarfFileNumber() to isValidDwarfFileNumber() to be better
named. Since it is just a predicate and isn't actually changing any state.
2) Added a missing return in the comments for setCurrentDwarfLoc() in
include/llvm/MC/MCContext.h for fix formatting.
3) Changed clearDwarfLocSeen() to ClearDwarfLocSeen() since it does change
state.
4) Simplified the last test in isValidDwarfFileNumber() to just a one line
boolean test of MCDwarfFiles[FileNumber] != 0 for the final return statement.
llvm-svn: 115551
2010-10-04 20:17:24 +00:00
Jan Wen Voung
9c76bbf90a
Add hook in MCSection to decide when to use "optimized nops", for each
...
section kind. Previously, optimized nops were only used for MachO.
Also added tests for ELF and COFF.
llvm-svn: 115523
2010-10-04 17:32:41 +00:00
Chris Lattner
d03783eaf2
the immediate field of pshufw is actually an 8-bit field, not a 8-bit field that is sign extended. This fixes PR8288
...
llvm-svn: 115473
2010-10-03 19:09:13 +00:00
Rafael Espindola
49d508fd19
Jim Asked us to move DataLayout on ARM back to the most specialized classes. Do
...
so and also change X86 for consistency.
Investigating if this can be improved a bit.
llvm-svn: 115469
2010-10-03 18:59:45 +00:00
Duncan Sands
6284b3db58
GCC extensions are no longer used here - update the comment.
...
llvm-svn: 115463
2010-10-03 15:31:50 +00:00
Duncan Sands
39e0233734
Remove two uses of the gcc specific 'aligned' attribute. This
...
is partly because this attribute caused trouble in the past (the
SmallVector one had to be changed from aligned to aligned(8) due
to causing crashes on i386 for example; in theory the same might
be needed in the Allocator case...). But it's mostly because
there seems to be no point in special casing gcc here. Using the
same implementation for all compilers results in better testing.
llvm-svn: 115462
2010-10-03 15:15:19 +00:00
Jakob Stoklund Olesen
cf5ec4b4cd
When RemoveCopyByCommutingDef is creating additional identity copies, just use
...
LiveInterval::MergeValueNumberInto instead of trying to extend LiveRanges and
getting it wrong.
This fixed PR8249 where a valno with a multi-segment live range was defined by
an identity copy created by RemoveCopyByCommutingDef. Some of the live
segments disappeared.
llvm-svn: 115385
2010-10-01 23:52:25 +00:00
Devang Patel
f612c0b23e
Add support to let FE mark explict methods as explict in debug info.
...
llvm-svn: 115378
2010-10-01 23:31:40 +00:00
Owen Anderson
95581657a4
Thread the determination of branch prediction hit rates back through the if-conversion heuristic APIs. For now,
...
stick with a constant estimate of 90% (branch predictors are good!), but we might find that we want to provide
more nuanced estimates in the future.
llvm-svn: 115364
2010-10-01 22:45:50 +00:00
Dale Johannesen
c14a1eda84
Massive rewrite of MMX:
...
The x86_mmx type is used for MMX intrinsics, parameters and
return values where these use MMX registers, and is also
supported in load, store, and bitcast.
Only the above operations generate MMX instructions, and optimizations
do not operate on or produce MMX intrinsics.
MMX-sized vectors <2 x i32> etc. are lowered to XMM or split into
smaller pieces. Optimizations may occur on these forms and the
result casted back to x86_mmx, provided the result feeds into a
previous existing x86_mmx operation.
The point of all this is prevent optimizations from introducing
MMX operations, which is unsafe due to the EMMS problem.
llvm-svn: 115243
2010-09-30 23:57:10 +00:00
Evan Cheng
8fbb31629f
Comments about operand cycles and pipeline forwarding pathes.
...
llvm-svn: 115214
2010-09-30 22:01:50 +00:00
Kevin Enderby
f3d8ed8368
Did my commit for the last patch for the .loc directory from the wrong place and
...
missed a bunch of files. Here the rest. Sorry about that.
llvm-svn: 115173
2010-09-30 17:16:09 +00:00
Kevin Enderby
dd3306fcb5
Adds getPointerSize() to the AsmBackend which will be needed by the final patch
...
for the dwarf .loc support to emit dwarf line number tables.
llvm-svn: 115153
2010-09-30 16:38:07 +00:00
Jan Wen Voung
7df9bf0092
Move logic of determining ELF entsize from the .s printer to initialization
...
time. That way, the EntrySize field is initialized for other code paths,
namely, the .ll -> .o code path.
llvm-svn: 115141
2010-09-30 05:59:22 +00:00
Jason W Kim
7822e6aab5
Tiny patch for proof-of-concept cleanup of ARMAsmPrinter::EmitStartOfAsmFile()
...
Small test for sanity check of resulting ARM .s file.
Tested against -r115129.
llvm-svn: 115133
2010-09-30 02:45:56 +00:00
Rafael Espindola
3e2630deca
Make it possible for the MCObjectWriter to decide if a given fixup is fully
...
resolved or not. Different object files have different restrictions and
different native assemblers have different idiosyncrasies we want to emulate
for now.
Move the existing MachO logic to the new place and implement an ELF one that
gets fixups to globals right.
llvm-svn: 115131
2010-09-30 02:22:20 +00:00
Jim Grosbach
046ae5dbac
Let a target specify whether it wants an assembly printer to be the MC version
...
or not. TableGen needs to generate the printInstruction() function as taking
an MCInstr* or a MachineInstr*, depending. Default to the old non-MC
version so that everything not yet using MC continues to just work without
fidding.
llvm-svn: 115126
2010-09-30 01:29:54 +00:00
Owen Anderson
aafc02daa9
Revert r115099 (adding early jump threading). It's not clear if the benefits are worth the compile time cost.
...
llvm-svn: 115106
2010-09-29 23:31:09 +00:00
Devang Patel
41e2a94595
Let FE mark a variable as artificial variable.
...
llvm-svn: 115102
2010-09-29 23:07:21 +00:00
Owen Anderson
2511059a16
Early CFG simplification can fold conditionals down to selects, which is often a good thing, but it can also
...
hide jump threading opportunities by turning control flow into data flow. Run an early JumpThreading pass
(adds approximately an additional 1% to optimization time on SPEC), allowing it to get a shot at these cases
first. Fixes <rdar://problem/8447345>.
llvm-svn: 115099
2010-09-29 22:57:02 +00:00
Evan Cheng
b44d480808
Model Cortex-a9 load to SUB, RSB, ADD, ADC, SBC, RSC, CMN, MVN, or CMP
...
pipeline forwarding path.
llvm-svn: 115098
2010-09-29 22:42:35 +00:00
Devang Patel
f600d9f0ed
Add support to let FE encode method access specifier.
...
llvm-svn: 115089
2010-09-29 21:44:16 +00:00
Devang Patel
bbd003ab48
Generalize DISubprogram element to encode various flags instead of just one boolean for isArtificial.
...
This is a backword compatible change.
llvm-svn: 115084
2010-09-29 21:04:46 +00:00
Chris Lattner
b7bfd3de07
remove PointerTracking from mainline, Edwin is going to move it out to ClamAV
...
for LLVM 2.9
llvm-svn: 115062
2010-09-29 18:43:27 +00:00
Chris Lattner
cbecb9a4d3
implement rdar://8456378 and PR7557 - support for the fstsw,
...
an instruction that requires a WHOLE NEW wonderful kind of alias.
llvm-svn: 115015
2010-09-29 01:50:45 +00:00
Chris Lattner
9b9a847b8c
change the protocol TargetAsmPArser::MatchInstruction method to take an
...
MCStreamer to emit into instead of an MCInst to fill in. This allows the
matcher extra flexibility and is more convenient.
llvm-svn: 115014
2010-09-29 01:42:58 +00:00
Evan Cheng
39c462b4f1
Add support to model pipeline bypass / forwarding.
...
llvm-svn: 115005
2010-09-28 23:50:49 +00:00
Owen Anderson
c0e1200323
Part one of switching to using a more sane heuristic for determining if-conversion profitability.
...
Rather than having arbitrary cutoffs, actually try to cost model the conversion.
For now, the constants are tuned to more or less match our existing behavior, but these will be
changed to reflect realistic values as this work proceeds.
llvm-svn: 114973
2010-09-28 18:32:13 +00:00
Devang Patel
e1f502ee26
Provide an interface to let FEs anchor debug info for types.
...
llvm-svn: 114969
2010-09-28 18:08:20 +00:00
Bill Wendling
3e1b942231
Add a new scope type "LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN" for the
...
"linker_private_weak_auto_def" linkage type for LTO.
llvm-svn: 114868
2010-09-27 20:17:45 +00:00
Daniel Dunbar
7179426193
MC/AsmParser: Handle exponents in floating point literals.
...
llvm-svn: 114861
2010-09-27 20:12:52 +00:00
Rafael Espindola
843df9bbed
Remove unused argument.
...
llvm-svn: 114852
2010-09-27 18:13:03 +00:00
Benjamin Kramer
cd6c025b08
Push twines deeper into SourceMgr's error handling methods.
...
llvm-svn: 114847
2010-09-27 17:42:11 +00:00
Dan Gohman
8443b40d5f
writeGraph doesn't need its ShortNames argument.
...
llvm-svn: 114842
2010-09-27 16:59:51 +00:00
Dan Gohman
830a560eef
Don't construct a redundant GraphWriter object.
...
llvm-svn: 114838
2010-09-27 16:54:13 +00:00
Dan Gohman
96a88043ca
Factor out code from the standalone WriteGraph function into a helper
...
function on GraphWriter.
llvm-svn: 114837
2010-09-27 16:44:11 +00:00
Dan Gohman
3c72647fd5
Constify properlyDominates in the same manner as dominates.
...
Add constified overloads for findNearestCommonDominator.
llvm-svn: 114834
2010-09-27 16:33:31 +00:00
Dan Gohman
773c8a1c76
Add support for viewing graphviz graphs with xdot.py.
...
llvm-svn: 114832
2010-09-27 16:28:34 +00:00
Dan Gohman
f9d7d6c9f9
Add an all() method to BitVector, for testing whether all bits are set.
...
llvm-svn: 114830
2010-09-27 15:48:37 +00:00
Dan Gohman
e024d78aab
Remove WriteGraph's Name argument, which it didn't use, and
...
rename writeHeader's Name argument to Title, to be consistent
with WriteGraph.
llvm-svn: 114829
2010-09-27 15:34:19 +00:00
Dan Gohman
31cdf8db52
Fix indentation.
...
llvm-svn: 114827
2010-09-27 14:44:14 +00:00
Chris Lattner
0ebcc18dec
the latest assembler that runs on powerpc 10.4 machines doesn't
...
support aligned comm. Detect when compiling for 10.4 and don't
emit an alignment for comm. THis will hopefully fix PR8198.
llvm-svn: 114817
2010-09-27 06:44:54 +00:00
Oscar Fuentes
2291919711
Avoid warnings about implicit conversions to `bool' in MSVC. This time
...
for real.
Patch by Nathan Jeffords!
llvm-svn: 114796
2010-09-25 20:27:36 +00:00
Jakob Stoklund Olesen
53ffe6c58b
Avoid using VNInfo::getCopy as much as possible. I want to get rid of it.
...
llvm-svn: 114794
2010-09-25 18:10:38 +00:00
Lang Hames
fb22f00975
Removed VNInfo::isDefAccurate(). Def "accuracy" can be checked by testing whether LiveIntervals::getInstructionFromIndex(def) returns NULL.
...
llvm-svn: 114791
2010-09-25 12:04:16 +00:00
Che-Liang Chiou
0eaf890a31
Add ret instruction to PTX backend
...
llvm-svn: 114788
2010-09-25 07:46:17 +00:00
Che-Liang Chiou
ab93b6355a
Remove trailing spaces of CallingConv.h
...
llvm-svn: 114787
2010-09-25 07:02:30 +00:00
Jakob Stoklund Olesen
af7994784c
Remove SlotIndex::PHI_BIT. It is no longer used by anything.
...
llvm-svn: 114779
2010-09-25 00:45:18 +00:00
Jakob Stoklund Olesen
794b5e00d7
Terminator gaps were unused. Might as well delete them.
...
llvm-svn: 114776
2010-09-24 23:58:56 +00:00
Nicolas Geoffray
3a40b52aea
Attach a DebugLoc to a GC point in order to get precise information in the JIT of a GC point.
...
llvm-svn: 114736
2010-09-24 17:27:50 +00:00
Daniel Dunbar
eacb42cfee
MC/Lexer: Add 'Real' token type for floating point literals.
...
llvm-svn: 114718
2010-09-24 01:59:31 +00:00
Owen Anderson
4fc55c0e02
Revert r114703 and r114702, removing the isConditionalMove flag from instructions. After further
...
reflection, this isn't going to achieve the purpose I intended it for. Back to the drawing board!
llvm-svn: 114710
2010-09-23 23:45:25 +00:00
Owen Anderson
d1753f939a
Add an TargetInstrDesc bit to indicate that a given instruction is a conditional move.
...
Not intended functionality change, as nothing uses this yet.
llvm-svn: 114702
2010-09-23 22:44:10 +00:00
Jim Grosbach
ed295d62f5
trailing whitespace
...
llvm-svn: 114680
2010-09-23 18:07:04 +00:00
Oscar Fuentes
095c140c09
Avoid warnings about conversions to `bool' in MS compilers.
...
Patch by Nathan Jeffords!
llvm-svn: 114662
2010-09-23 16:59:44 +00:00
Lang Hames
f670bff621
Moved the PBQP allocator class out of the header and back in to the cpp file to hide the gory details.
...
Allocator instances can now be created by calling createPBQPRegisterAllocator.
Tidied up use of CoalescerPair as per Jakob's suggestions.
Made the new PBQPBuilder based construction process the default. The internal construction process
remains in-place and available via -pbqp-builder=false for now. It will be removed shortly if the new
process doesn't cause any regressions.
llvm-svn: 114626
2010-09-23 04:28:54 +00:00
Jim Grosbach
d8735f1db1
Add support for ELF PLT references for ARM MC asm printing. Adding a
...
new VariantKind to the MCSymbolExpr seems like overkill, but I'm not sure
there's a more straightforward way to get the printing difference captured.
(i.e., x86 uses @PLT, ARM uses (PLT)).
llvm-svn: 114613
2010-09-22 23:27:36 +00:00
Dan Gohman
d299070514
Make SetVector's remove indicate whether it actually removed something.
...
llvm-svn: 114612
2010-09-22 23:20:04 +00:00
Rafael Espindola
3cfff6e0c5
Avoid some Mach-O specific alignment being done on ELF.
...
llvm-svn: 114594
2010-09-22 22:27:05 +00:00
Chris Lattner
04d9e1641f
allow target-specific label suffixes, patch by Yuri Gribov!
...
llvm-svn: 114592
2010-09-22 22:19:53 +00:00
Dan Gohman
3ae6b70330
Fix uninitialized TBAAFlag field values.
...
llvm-svn: 114591
2010-09-22 22:18:07 +00:00
Dan Gohman
d69790d841
Teach memdep about TBAA tags.
...
llvm-svn: 114588
2010-09-22 21:41:02 +00:00
Dan Gohman
879cf5573e
Constify.
...
llvm-svn: 114574
2010-09-22 20:11:43 +00:00
Chris Lattner
6543dacfac
Rework passing parent pointers into complexpatterns, I forgot
...
that complex patterns are matched after the entire pattern has
a structural match, therefore the NodeStack isn't in a useful
state when the actual call to the matcher happens.
llvm-svn: 114489
2010-09-21 22:00:25 +00:00
Dan Gohman
008676d2ee
Add some utility routines.
...
llvm-svn: 114483
2010-09-21 21:20:13 +00:00
Devang Patel
904f538a7a
Add insertAfter. This should have accompanied previous check-in.
...
llvm-svn: 114481
2010-09-21 21:10:42 +00:00
Chris Lattner
a911c9ed3a
just like they can opt into getting the root of the pattern being
...
matched, allow ComplexPatterns to opt into getting the parent node
of the operand being matched.
llvm-svn: 114472
2010-09-21 20:37:12 +00:00
Chris Lattner
55043ef46a
fix a long standing wart: all the ComplexPattern's were being
...
passed the root of the match, even though only a few patterns
actually needed this (one in X86, several in ARM [which should
be refactored anyway], and some in CellSPU that I don't feel
like detangling). Instead of requiring all ComplexPatterns to
take the dead root, have targets opt into getting the root by
putting SDNPWantRoot on the ComplexPattern.
llvm-svn: 114471
2010-09-21 20:31:19 +00:00
Chris Lattner
32ec32b690
finish pushing MachinePointerInfo through selectiondags. At this point,
...
I think I've audited all uses, so it should be dependable for address spaces,
and the pointer+offset info should also be accurate when there.
llvm-svn: 114464
2010-09-21 18:58:22 +00:00
Chris Lattner
3dde58c15a
convert a couple more places to use the new getStore()
...
llvm-svn: 114463
2010-09-21 18:51:21 +00:00
Chris Lattner
86b3f287ce
eliminate an old SelectionDAG::getTruncStore method, propagating
...
MachinePointerInfo around more.
llvm-svn: 114452
2010-09-21 17:42:31 +00:00
Chris Lattner
bf98f86fed
eliminate last SelectionDAG::getLoad old entrypoint, on to stores.
...
llvm-svn: 114450
2010-09-21 17:28:52 +00:00
Chris Lattner
8af4fb7aed
fix the code that infers SV info to be correct when dealing
...
with an indexed load/store that has an offset in the index.
llvm-svn: 114449
2010-09-21 17:24:05 +00:00
Jakob Stoklund Olesen
03451a0e51
Add LiveInterval::find and use it for most LiveRange searching operations
...
instead of calling lower_bound or upper_bound directly.
This cleans up the search logic a bit because {lower,upper}_bound compare
LR->start by default, and it is usually simpler to search LR->end.
Funnelling all searches through one function also makes it possible to replace
the search algorithm with something faster than binary search.
llvm-svn: 114448
2010-09-21 17:12:18 +00:00
Jakob Stoklund Olesen
73d2940daa
Remove dead method.
...
llvm-svn: 114447
2010-09-21 17:12:15 +00:00
Chris Lattner
cdfd993df0
propagate MachinePointerInfo through various uses of the old
...
SelectionDAG::getExtLoad overload, and eliminate it.
llvm-svn: 114446
2010-09-21 17:04:51 +00:00
Chris Lattner
0d430648ae
continue MachinePointerInfo'izing, eliminating use of one of the old
...
getLoad overloads.
llvm-svn: 114443
2010-09-21 16:36:31 +00:00
Benjamin Kramer
a81f2ba27e
Make CreateComplexVariable independent of SmallVector.
...
llvm-svn: 114439
2010-09-21 16:00:03 +00:00
Mikhail Glushenkov
35e2ea68d2
llvmc: Allow multiple output languages.
...
llvm-svn: 114433
2010-09-21 14:59:42 +00:00
Mikhail Glushenkov
637b2871f8
Trailing whitespace.
...
llvm-svn: 114432
2010-09-21 14:59:34 +00:00
Lang Hames
eae68e1117
Added an additional PBQP problem builder which adds coalescing costs (both between pairs of virtuals, and between virtuals and physicals).
...
llvm-svn: 114429
2010-09-21 13:19:36 +00:00
Gabor Greif
99c07b1d95
Move the search for the appropriate AND instruction
...
into OptimizeCompareInstr.
This necessitates the passing of CmpValue around,
so widen the virtual functions to accomodate.
No functionality changes.
llvm-svn: 114428
2010-09-21 12:01:15 +00:00
Chris Lattner
1cad885bf7
add some accessors
...
llvm-svn: 114409
2010-09-21 06:43:24 +00:00
Chris Lattner
112cf9bc89
it's more elegant to put the "getConstantPool" and
...
"getFixedStack" on the MachinePointerInfo class. While
this isn't the problem I'm setting out to solve, it is the
right way to eliminate PseudoSourceValue, so lets go with it.
llvm-svn: 114406
2010-09-21 06:22:23 +00:00
Chris Lattner
3496d7e718
ugh, missed a file.
...
llvm-svn: 114405
2010-09-21 06:16:40 +00:00
Chris Lattner
f94de5bf46
reimplement memcpy/memmove/memset lowering to use MachinePointerInfo
...
instead of srcvalue/offset pairs. This corrects SV info for mem
operations whose size is > 32-bits.
llvm-svn: 114401
2010-09-21 05:40:29 +00:00
Chris Lattner
b6d15db75c
add some helpful accessors.
...
llvm-svn: 114400
2010-09-21 05:39:30 +00:00
Chris Lattner
dbe51ad1b8
add overloads for SelectionDAG::getLoad, getStore, getTruncStore that take a
...
MachinePointerInfo. Among other virtues, this doesn't silently truncate the
svoffset to 32-bits.
llvm-svn: 114399
2010-09-21 05:10:45 +00:00
Chris Lattner
e1fc671030
simplify interface to SelectionDAG::getMemIntrinsicNode, making it take a MachinePointerInfo
...
llvm-svn: 114397
2010-09-21 04:57:15 +00:00
Chris Lattner
e4db4cad3b
chagne interface to SelectionDAG::getAtomic to take a MachinePointerInfo,
...
eliminating some weird "infer a frame address" logic which was dead.
llvm-svn: 114396
2010-09-21 04:53:42 +00:00
Chris Lattner
af01f8d142
force clients of MachineFunction::getMachineMemOperand to provide a
...
MachinePointerInfo, propagating the type out a level of API. Remove
the old MachineFunction::getMachineMemOperand impl.
llvm-svn: 114393
2010-09-21 04:46:39 +00:00
Chris Lattner
940c35a3c3
start pushing MachinePointerInfo out through the MachineMemOperand interface
...
to the MachineFunction construction methods.
llvm-svn: 114390
2010-09-21 04:32:08 +00:00