Chris Lattner
1d3b65a6ae
fix a pasto.
...
llvm-svn: 74275
2009-06-26 05:56:49 +00:00
Chris Lattner
68bb4e0e01
dot graph viewing is apparently not using SDNode::print_details, this is bad,
...
but in the meantime lets print targetflags on node labels.
llvm-svn: 74274
2009-06-26 05:55:43 +00:00
Chris Lattner
17dcba9da4
propagate target operand flags from dag nodes into MachineOperands.
...
llvm-svn: 74273
2009-06-26 05:52:14 +00:00
Chris Lattner
bd7e26db16
propagate target operand flags through addressing mode selection.
...
llvm-svn: 74272
2009-06-26 05:51:45 +00:00
Chris Lattner
54b8ebced6
fit in 80 cols
...
llvm-svn: 74270
2009-06-26 05:39:02 +00:00
Nick Lewycky
2dbc6476cb
Escape the name of the module since it comes from the file name and may include
...
invalid characters like backslashes on Windows. Patch by James Abbatiello!
llvm-svn: 74265
2009-06-26 04:33:37 +00:00
Devang Patel
2cc6d183b2
Let's ignore MDStrings also!
...
llvm-svn: 74255
2009-06-26 02:26:12 +00:00
Daniel Dunbar
e7d42501c2
Fix may-be-used-uninitialized warning.
...
llvm-svn: 74253
2009-06-26 02:03:52 +00:00
Devang Patel
0751a28888
Remove debug info anchors - llvm.dbg.compile_units, llvm.dbg.subprograms
...
and llvm.dbg.global_variables.
llvm-svn: 74251
2009-06-26 01:49:18 +00:00
Daniel Dunbar
aa311ca000
Fix unused variable warnings.
...
llvm-svn: 74250
2009-06-26 01:34:35 +00:00
Owen Anderson
276fc52b72
Fix error in the Win32 implementation pointed out by Howard Su.
...
llvm-svn: 74248
2009-06-26 00:51:20 +00:00
Chris Lattner
2aaad91bbe
start adding logic in isel to determine asm printer semantics, step N of M.
...
llvm-svn: 74246
2009-06-26 00:43:52 +00:00
Dan Gohman
ac3b5382b8
Change this code to a form about which VC++ reportedly isn't unhappy.
...
llvm-svn: 74243
2009-06-26 00:35:12 +00:00
Dan Gohman
7eaf50ecac
Fix LCSSA to avoid emitting a PHI node for the unwind destination of
...
an invoke instruction, since the value isn't really live across that
edge.
llvm-svn: 74242
2009-06-26 00:31:13 +00:00
Evan Cheng
e2c4d35f3e
Add a note about commuting conditional move.
...
llvm-svn: 74241
2009-06-26 00:28:48 +00:00
Dan Gohman
31167c61d5
Minor code simplification.
...
llvm-svn: 74240
2009-06-26 00:26:03 +00:00
Evan Cheng
cf661fc12a
These are done / no longer applicable.
...
llvm-svn: 74239
2009-06-26 00:25:27 +00:00
Evan Cheng
5bf9011c2d
Mark a bunch of instructions commutable.
...
llvm-svn: 74237
2009-06-26 00:19:44 +00:00
Evan Cheng
9643ba8123
tst is also commutable.
...
llvm-svn: 74236
2009-06-26 00:19:07 +00:00
Owen Anderson
b99db00b64
Committed the wrong version in my last commit.
...
llvm-svn: 74235
2009-06-26 00:17:05 +00:00
Owen Anderson
1efcb40c0f
Privatize a static variable.
...
llvm-svn: 74234
2009-06-26 00:15:27 +00:00
Owen Anderson
b74e84793d
Guards for the compiler driver plugin list.
...
llvm-svn: 74230
2009-06-26 00:06:28 +00:00
Evan Cheng
97727a61f9
Select ADC, SBC, and RSC instead of the ADCS, SBCS, and RSCS when the carry bit def is not used.
...
llvm-svn: 74228
2009-06-25 23:34:10 +00:00
Owen Anderson
76cfd205ff
Support thread-local pretty stack traces.
...
llvm-svn: 74227
2009-06-25 23:31:33 +00:00
Owen Anderson
eba6e65291
Add support for const thread locals.
...
llvm-svn: 74226
2009-06-25 23:31:18 +00:00
Owen Anderson
eb51111851
Fix typo in assertion.
...
llvm-svn: 74225
2009-06-25 23:28:28 +00:00
David Goodwin
16f357cccf
Use MVN for ~t2_so_imm immediates.
...
llvm-svn: 74223
2009-06-25 23:11:21 +00:00
Owen Anderson
1154983b9c
Add a configure test for pthread_getspecific, and use it when building ThreadLocal.
...
llvm-svn: 74222
2009-06-25 23:10:26 +00:00
David Goodwin
e85169cd1b
Add Def/Use of CPSR for Thumb-1 instructions.
...
llvm-svn: 74219
2009-06-25 22:49:55 +00:00
Devang Patel
0c044ecdb0
Simplify.
...
llvm-svn: 74215
2009-06-25 22:36:02 +00:00
Evan Cheng
7e687191fd
Unbreak mingw build. Patch by Viktor Kutuzov.
...
llvm-svn: 74212
2009-06-25 22:04:44 +00:00
Owen Anderson
bc17dc6ed4
Update cmake build files.
...
llvm-svn: 74210
2009-06-25 21:58:34 +00:00
Owen Anderson
f17f6f06fa
Add a class for supporting platform independent thread-local storage.
...
Windows people, please double-check/patch this.
llvm-svn: 74209
2009-06-25 21:58:01 +00:00
Chris Lattner
b3586b6e73
add targetflags to jump tables and constant pool entries.
...
llvm-svn: 74204
2009-06-25 21:35:31 +00:00
Chris Lattner
8e34f98d72
allow setting target operand flags on TargetGlobalAddress nodes.
...
llvm-svn: 74203
2009-06-25 21:21:14 +00:00
Daniel Dunbar
188e87fa21
MC: Truncate values when printing, to keep 'as' happy.
...
llvm-svn: 74201
2009-06-25 21:03:18 +00:00
Evan Cheng
c7ea8df67e
ISD::ADDE / ISD::SUBE updates the carry bit so they should isle to ADCS and SBCS / RSCS.
...
llvm-svn: 74200
2009-06-25 20:59:23 +00:00
Chris Lattner
af5dbfc6f8
start bringing targetoperand flags into isel, first up, ExternalSymbol.
...
llvm-svn: 74199
2009-06-25 18:45:50 +00:00
Mikhail Glushenkov
674207eed2
Make -save-temps behave like in GCC 4.5.
...
The -save-temps option now behaves like described in GCC 4.5 release notes
(you can specify output directory for temporary files with -save-temps=obj
-o $DIRNAME). I do not have GCC 4.5 installed, so if there are any
inconsistencies between llvmc and GCC in the implementation of this
feature, please let me know.
llvm-svn: 74190
2009-06-25 18:20:10 +00:00
Owen Anderson
3f76e6f835
Privatize this map.
...
llvm-svn: 74189
2009-06-25 18:13:04 +00:00
Owen Anderson
021c3b0756
Guard dynamic library loading.
...
I did my best at implementing this for Win32, but I don't have a way to test it.
Can someone with access to a Win32 machine test/fix this?
llvm-svn: 74188
2009-06-25 18:12:44 +00:00
Sanjiv Gupta
78bd40ee89
Added floating point conditional operations support via libcalls.
...
llvm-svn: 74187
2009-06-25 18:12:06 +00:00
Chris Lattner
83992b19e4
simplify shouldPrintPLT
...
llvm-svn: 74186
2009-06-25 17:58:52 +00:00
David Goodwin
e892e8bfaf
Test commit
...
llvm-svn: 74185
2009-06-25 17:52:32 +00:00
Chris Lattner
852739b46f
Use target-specific machine operand flags to eliminate a gross hack
...
from the asmprinter.
llvm-svn: 74184
2009-06-25 17:38:33 +00:00
Chris Lattner
1927844ebf
just eliminate the code entirely!
...
llvm-svn: 74183
2009-06-25 17:28:07 +00:00
Owen Anderson
5defd5655e
Provide guards for this shared structure. I'm not sure this actually needs
...
to be shared, but how/where to privatize it is not immediately clear to me.
If any SelectionDAG experts see a better solution, please share!
llvm-svn: 74180
2009-06-25 17:09:00 +00:00
Owen Anderson
e384952e47
Privatize some more debug-related static data.
...
llvm-svn: 74179
2009-06-25 16:55:32 +00:00
Owen Anderson
52d70e2d05
Use a more correct atomic increment style. This isn't really necessary in
...
this case, but it should help avoid issues in the future.
llvm-svn: 74178
2009-06-25 16:32:45 +00:00
Bob Wilson
8f74c88cb6
Revert 74164. We'll want to use this method later.
...
llvm-svn: 74176
2009-06-25 16:03:07 +00:00
Sanjiv Gupta
1a20d2ab98
Identify unconditional gotos and generate a page sel instructions before them.
...
llvm-svn: 74172
2009-06-25 11:03:14 +00:00
Bruno Cardoso Lopes
e364a233c0
Support Constant Pool Sections
...
Add section symbols to the symbol table
llvm-svn: 74170
2009-06-25 07:36:24 +00:00
Bob Wilson
350abb9799
Remove unused hasV6T2Ops method. We already have a separate feature to
...
identify Thumb2.
llvm-svn: 74164
2009-06-25 05:20:31 +00:00
Douglas Gregor
2042c3519d
Add missing dependencies to the CMake build system.
...
llvm-svn: 74161
2009-06-25 05:03:06 +00:00
Chris Lattner
a0117b65a2
add file to cmake
...
llvm-svn: 74159
2009-06-25 04:29:08 +00:00
Evan Cheng
d76f0be844
Change thumb2 instruction definitions so if-converter so add predicate operands and / or flip the 's' bit to set the condition flag.
...
llvm-svn: 74158
2009-06-25 02:08:06 +00:00
Jeffrey Yasskin
0b08f3d7cc
Add a JITEventListener interface that gets called back when a new function is
...
emitted or the machine code for a function is freed. Chris mentioned that we
may also want a notification when a stub is emitted, but that'll be a future
change. I intend to use this to tell oprofile where functions are emitted and
what lines correspond to what addresses.
llvm-svn: 74157
2009-06-25 02:04:04 +00:00
Evan Cheng
6ea7ad0351
Add thumb2 add sp.
...
llvm-svn: 74156
2009-06-25 01:21:30 +00:00
Chris Lattner
ea7422e7bf
fix comments to be correct.
...
llvm-svn: 74154
2009-06-25 01:15:47 +00:00
Evan Cheng
b566ab7b97
Some reorg and additional comments.
...
llvm-svn: 74152
2009-06-25 01:05:06 +00:00
Devang Patel
9d68302e48
No need to code gen MDNodes
...
llvm-svn: 74150
2009-06-25 00:47:42 +00:00
Bill Wendling
7f7eb8ac13
My guess is that RegInfo should only call the Allocator.Deallocator if it's not
...
null.
llvm-svn: 74147
2009-06-25 00:32:48 +00:00
Dan Gohman
091e440568
Reword a few comments.
...
llvm-svn: 74146
2009-06-25 00:22:44 +00:00
Owen Anderson
b5042f20e7
Now with EVEN FEWER statics!
...
llvm-svn: 74143
2009-06-25 00:04:15 +00:00
Evan Cheng
83f979a48b
Add Thumb2 pc relative add.
...
llvm-svn: 74141
2009-06-24 23:47:58 +00:00
Owen Anderson
816e2833c4
Fewer static variables, part 3 of many.
...
llvm-svn: 74140
2009-06-24 23:41:44 +00:00
Evan Cheng
4c048fe5ad
80 col violation.
...
llvm-svn: 74138
2009-06-24 23:14:45 +00:00
Owen Anderson
19c4b66830
Down with _even more_ statics!
...
llvm-svn: 74137
2009-06-24 23:13:56 +00:00
Owen Anderson
9becc183e1
Down with statics!
...
llvm-svn: 74134
2009-06-24 22:53:20 +00:00
Devang Patel
4c563168d5
Add constructor to create MDString using std::string
...
llvm-svn: 74133
2009-06-24 22:42:39 +00:00
Owen Anderson
ae471cf3a9
Move local statics to per-instance variables.
...
llvm-svn: 74132
2009-06-24 22:28:12 +00:00
Owen Anderson
8e62b5f339
Make this thread-safe.
...
llvm-svn: 74129
2009-06-24 22:16:52 +00:00
Owen Anderson
4830e08613
Get rid of a static boolean.
...
llvm-svn: 74125
2009-06-24 22:08:59 +00:00
Andreas Bolka
8c7e299270
Scaffolding for LDA pass.
...
llvm-svn: 74120
2009-06-24 21:29:13 +00:00
Bob Wilson
a1d3e660ae
Fix the Ocaml bindings for the ExecutionEngine: with the change to build
...
libraries instead of relinked objects, the interpreter, JIT, and native
target libraries were not being linked in to an ocaml program using the
ExecutionEngine.
llvm-svn: 74117
2009-06-24 21:09:18 +00:00
Lang Hames
6858b7d06a
Completed basic intra block split implementation.
...
llvm-svn: 74114
2009-06-24 20:46:24 +00:00
Chris Lattner
6544289af3
move some functions, add a FIXME, use PrintPICBaseSymbol to print the
...
picbase instead of inlining it.
llvm-svn: 74111
2009-06-24 19:44:36 +00:00
David Greene
30048bdb63
This increases the maximum for MVT::LAST_VALUETYPE
...
This change doubles the allowable value for MVT::LAST_VALUETYPE. It does
this by doing several things.
1. Introduces MVT::MAX_ALLOWED_LAST_VALUETYPE which in this change has a
value of 64. This value contains the current maximum for the
MVT::LAST_VALUETYPE.
2. Instead of checking "MVT::LAST_VALUETYPE <= 32", all of those uses
now become "MVT::LAST_VALUETYPE <= MVT::MAX_ALLOWED_LAST_VALUETYPE"
3. Changes the dimension of the ValueTypeActions from 2 elements to four
elements and adds comments ahead of the declaration indicating the it is
"(MVT::MAX_ALLOWED_LAST_VALUETYPE/32) * 2". This at least lets us find
what is affected if and when MVT::MAX_ALLOWED_LAST_VALUETYPE gets
changed.
4. Adds initializers for the new elements of ValueTypeActions.
This does NOT add any types in MVT. That would be done separately.
This doubles the size of ValueTypeActions from 64 bits to 128 bits and
gives us the freedom to add more types for AVX.
llvm-svn: 74110
2009-06-24 19:41:55 +00:00
Daniel Dunbar
71ea89dd86
Sketch streamer support for .align, .org functionality.
...
llvm-svn: 74109
2009-06-24 19:25:34 +00:00
Chris Lattner
9b4aaef9d4
reimplement getPICLabelString as PrintPICBaseSymbol to eliminate std::string heap thrashing.
...
llvm-svn: 74105
2009-06-24 19:19:16 +00:00
Chris Lattner
1fd5888294
sink management of DwarfWriter & MachineModuleInfo into the AsmPrinter base class.
...
llvm-svn: 74101
2009-06-24 19:09:55 +00:00
Chris Lattner
70413126b6
sink dwarf finalization out of each target into AsmPrinter::doFinalization
...
llvm-svn: 74097
2009-06-24 18:54:37 +00:00
Chris Lattner
2981dc1742
eliminate the ExtWeakSymbols set from AsmPrinter. This eliminates
...
a bunch of code from all the targets, and eliminates nondeterministic
ordering of directives being emitted in the output.
llvm-svn: 74096
2009-06-24 18:52:01 +00:00
Chris Lattner
a297e0c9b1
only emit one .align for all the hidden gv stubs instead of one for each.
...
llvm-svn: 74094
2009-06-24 18:24:42 +00:00
Chris Lattner
f094f09b76
inline print*Stub and rearrange function stub printing to more closely match
...
gv and hiddengv stub printing.
llvm-svn: 74093
2009-06-24 18:24:09 +00:00
Chris Lattner
13fb0bef1c
remove dead code now that personality functions don't print stubs directly.
...
llvm-svn: 74092
2009-06-24 18:19:01 +00:00
Chris Lattner
e8ad3f13fa
remove now-dead argument.
...
llvm-svn: 74091
2009-06-24 18:17:56 +00:00
Chris Lattner
cc5104dcc4
simplify personality function stub printing to use the mangler and
...
decorateName like other stuff instead of special casing _. Also, stick
it into GVStubs and let the normal stub printer print the stub instead
of doing it manually.
llvm-svn: 74090
2009-06-24 18:17:00 +00:00
Chris Lattner
63aab8a84c
remove dead argument
...
llvm-svn: 74089
2009-06-24 18:00:11 +00:00
Chris Lattner
fd682802e3
Rearrange some stuff in MachineOperand and add a new TargetFlags field.
...
llvm-svn: 74087
2009-06-24 17:54:48 +00:00
Owen Anderson
b70adf2b92
Get rid of the global CFGOnly flag by threading a ShortNames parameters through the GraphViz rendering code.
...
Update other uses in the codebase for this change.
llvm-svn: 74084
2009-06-24 17:37:09 +00:00
Dale Johannesen
92c11e90c8
Rewrite 73900 per Duncan's suggestion.
...
llvm-svn: 74082
2009-06-24 17:11:31 +00:00
Daniel Dunbar
f782ebc0cb
We decided to not worry about Atoms for now, it should be straightforward to
...
reintroduce them later.
Also, don't require MCSection* when creating a symbol.
llvm-svn: 74081
2009-06-24 17:00:42 +00:00
Daniel Dunbar
59ff06e83c
MCStreamer: Add a few more "symbol attributes".
...
llvm-svn: 74077
2009-06-24 16:36:52 +00:00
Daniel Dunbar
de5777022c
MCStreamer: Test printing values.
...
llvm-svn: 74076
2009-06-24 16:05:35 +00:00
Dan Gohman
abd1709678
Minor whitespace cleanups.
...
llvm-svn: 74074
2009-06-24 14:49:00 +00:00
Dan Gohman
f57bdb75d4
Simplify [su]max(MAX, n) to MAX. This comes up in loop tripcount
...
computations in loops with multiple exits.
Adjust the testcase for PR4436 so that the relevant portion isn't
optimized away.
llvm-svn: 74073
2009-06-24 14:46:22 +00:00
Dan Gohman
929fa7b0f4
When inserting code into a loop preheader, insert it before the
...
terminator, instead of after the last phi. This fixes a bug
exposed by ScalarEvolution analyzing more kinds of loops.
This fixes PR4436.
llvm-svn: 74072
2009-06-24 14:31:06 +00:00
Duncan Sands
cfe7626413
Add new files to cmake list.
...
llvm-svn: 74071
2009-06-24 10:03:44 +00:00
Chris Lattner
9db5fbac05
factor some code better.
...
llvm-svn: 74067
2009-06-24 05:47:59 +00:00
Chris Lattner
9f40bc2f79
wire up support for MCContext/MCStreamer in -experimental-asm-printer mode.
...
llvm-svn: 74066
2009-06-24 05:46:28 +00:00
Chris Lattner
3912036c25
remove dead makefile flags.
...
llvm-svn: 74065
2009-06-24 05:29:56 +00:00
Dan Gohman
ce973df28b
Delete some orphaned comments, fix some 80-column violations,
...
and tidy up a few other formatting issues.
llvm-svn: 74060
2009-06-24 04:48:43 +00:00
Chris Lattner
3f5738d599
add trivial support for passing label definitions through the MCStreamer.
...
This is suboptimal in several aspects, see the commented out assertion.
I need to talk to Daniel about this.
llvm-svn: 74057
2009-06-24 04:31:49 +00:00
Lang Hames
828e301c8e
Fixed a bug in LiveInterval scaling (failure to scale VNI defs correctly), removed old TODO comments.
...
llvm-svn: 74054
2009-06-24 02:17:32 +00:00
Evan Cheng
38f2453817
Fix support for inline asm input / output operand tying when operand spans across multiple registers (e.g. two i64 operands in 32-bit mode).
...
llvm-svn: 74053
2009-06-24 02:05:51 +00:00
Dan Gohman
f19aeec3f5
Extend ScalarEvolution's multiple-exit support to compute exact
...
trip counts in more cases.
Generalize ScalarEvolution's isLoopGuardedByCond code to recognize
And and Or conditions, splitting the code out into an
isNecessaryCond helper function so that it can evaluate Ands and Ors
recursively, and make SCEVExpander be much more aggressive about
hoisting instructions out of loops.
test/CodeGen/X86/pr3495.ll has an additional instruction now, but
it appears to be due to an arbitrary register allocation difference.
llvm-svn: 74048
2009-06-24 01:18:18 +00:00
Nick Lewycky
443af01b1a
Unbreak build on Linux by removing Darwinism.
...
llvm-svn: 74046
2009-06-24 01:08:42 +00:00
Dan Gohman
d261d27165
Teach GetMinSignBits about SCEVAddExprs.
...
llvm-svn: 74045
2009-06-24 01:05:09 +00:00
Daniel Dunbar
9faf273fc4
Start MCAsmStreamer implementation.
...
llvm-svn: 74044
2009-06-24 01:03:06 +00:00
Dan Gohman
a3d375845e
Revert this accidental commit.
...
llvm-svn: 74042
2009-06-24 00:55:55 +00:00
Dan Gohman
f436bacb6b
Move the special cases for constants out of getUnknown and into
...
createSCEV. Also, recognize UndefValue in createSCEV.
Change getIntegerSCEV's comment to avoid mentioning FP types,
and re-implement it in terms of getConstant instead of getUnknown.
llvm-svn: 74041
2009-06-24 00:54:57 +00:00
Dan Gohman
8d7576e12c
Use ScalarEvolution::getConstant instead of getUnknown to create
...
SCEVConstants. This cleanup is a step toward letting getUnknown
be simpler.
llvm-svn: 74037
2009-06-24 00:38:39 +00:00
Dan Gohman
6994293b17
Include the maximum trip count expression in ScalarEvolution's print output.
...
llvm-svn: 74035
2009-06-24 00:33:16 +00:00
Dan Gohman
18a96bb07f
Add an isAllOnesValue utility function, similar to isZero and isOne.
...
llvm-svn: 74032
2009-06-24 00:30:26 +00:00
Dan Gohman
f522a4e034
Don't emit a redundant BitCastInst if the value to be defined in the
...
preheader is already an instruction.
llvm-svn: 74031
2009-06-24 00:28:59 +00:00
Owen Anderson
ecdab5406d
Guard the listeners list. Unfortunately, this requires a real static rather
...
than a managed static because other managed statics can (and do) access this
list in their destructors. Yes, I know it's horrible.
llvm-svn: 74029
2009-06-24 00:25:42 +00:00
Bob Wilson
5a495fea07
Provide InitializeAllTargets and InitializeNativeTarget functions in the
...
C bindings. Change all the backend "Initialize" functions to have C linkage.
Change the "llvm/Config/Targets.def" header to use C-style comments to avoid
compile warnings.
llvm-svn: 74026
2009-06-23 23:59:40 +00:00
Daniel Dunbar
badeace84a
Update for MCImm -> MCValue rename.
...
llvm-svn: 74024
2009-06-23 23:39:15 +00:00
Sean Callanan
9c14bce0f9
Test commit: fixed spacing.
...
llvm-svn: 74022
2009-06-23 23:25:37 +00:00
Devang Patel
2ed89d7faa
It is not a good idea to have data member's name match argument's name. In fact, it is a simple receipe to waste an hour or so.
...
llvm-svn: 74018
2009-06-23 22:25:41 +00:00
Devang Patel
4d3a423dcd
Use getReturnTypeName() to print return type.
...
llvm-svn: 74017
2009-06-23 22:23:13 +00:00
Daniel Dunbar
ca29e4d7f4
Start flushing out MCContext.
...
- Lives inside new library lib/MC (LLVMMC.a)
llvm-svn: 74013
2009-06-23 22:01:43 +00:00
Owen Anderson
ca8f986f63
Use atomic operations when accessing statistics, and make the lazy initialization of statistics actually threadsafe.
...
llvm-svn: 74005
2009-06-23 21:19:38 +00:00
Owen Anderson
1fdf01026b
Add atomic multiply and divide operations, built on top of CompareAndSwap.
...
llvm-svn: 74004
2009-06-23 21:19:04 +00:00
Owen Anderson
e9b1beb543
Make timers threadsafe again. This isn't quite as nice as I'd hoped (it uses locking rather than atomic arithmetic),
...
but should work on all the platforms we care about.
I might revisit this if a totally awesome way to do it occurs to me.
llvm-svn: 74002
2009-06-23 20:52:29 +00:00
Owen Anderson
5cc4131063
Revert my last series of commits related to Timer and 64-bit atomics. Not all the targets
...
we care about are capable of supporting it.
llvm-svn: 73993
2009-06-23 20:17:22 +00:00
Evan Cheng
7d80d29187
Test instructions operands were printed in the wrong order.
...
llvm-svn: 73990
2009-06-23 19:56:37 +00:00
Bill Wendling
f6e8f6b0f4
"The MMX_MASKMOVQ and MMX_MASKMOVQ64 instructions are labeled as MRMDestMem
...
instructions, which implies that there is an explicit memory operand. There is
(however) no explicit memory operand; although this is a store, the only memory
operand is implicit, indicated by DS:EDI. This causes the table-generation code
for the disassembler to report an error."
Patch by Sean Callanan!
llvm-svn: 73989
2009-06-23 19:52:59 +00:00
Lang Hames
c547bad3ff
Switched size_t to int64_t to prevent type mismatch in call to max.
...
llvm-svn: 73988
2009-06-23 19:49:23 +00:00
Evan Cheng
4983e4550e
Proper patterns for thumb2 shift and rotate instructions.
...
llvm-svn: 73987
2009-06-23 19:39:13 +00:00
Evan Cheng
8d21e9c4e6
Code clean up.
...
llvm-svn: 73986
2009-06-23 19:38:34 +00:00
Evan Cheng
bec1dba896
Add IsThumb1Only to most 16-bit thumb instructions since we want to isel 32-bit instructions when they are available.
...
llvm-svn: 73985
2009-06-23 19:38:13 +00:00
Owen Anderson
9262d43c5d
Atomic ops that do arithmetic use signed arithmetic.
...
llvm-svn: 73980
2009-06-23 18:30:27 +00:00
Owen Anderson
ddf74dc986
Actually, these need to be signed integers, not unsigned.
...
llvm-svn: 73978
2009-06-23 18:21:13 +00:00
Evan Cheng
e379107cdc
Rename SelectShifterOperand to SelectThumb2ShifterOperandReg.
...
llvm-svn: 73975
2009-06-23 18:14:38 +00:00
Owen Anderson
bf45b3e2ad
Use 64-bit integer counters for tracking time, rather than doubles. This will be more atomic op friendly.
...
llvm-svn: 73974
2009-06-23 18:12:30 +00:00
Owen Anderson
9e3df5b67f
Label the existing atomic functions as 32-bit specific, and add a 64-bit one that will be useful in
...
the near future.
llvm-svn: 73971
2009-06-23 18:01:04 +00:00
Douglas Gregor
85fedbe081
Eliminate object-relinking support from CMake. Fixes PR 4429 and
...
cleans up the CMake-based build system a bit. Started by a patch from
Xerxes Rånby.
llvm-svn: 73969
2009-06-23 17:57:35 +00:00
Evan Cheng
b45cebabc9
Obvious typo.
...
llvm-svn: 73967
2009-06-23 17:54:26 +00:00
Evan Cheng
431cf567de
Initial Thumb2 support. Majority of the work is done by David Goodwin. There are
...
also some contribution from Jim Grosbach, Bob Wilson, and Evan Cheng.
I've done my best to consolidate the patches with those that were done by
Viktor Kutuzov and Anton Korzh from Access Softek, Inc. Let me know if missed
anything. I've completely reorganized the thumb2 td file, made more extensive
uses of multiclass, etc.
Test cases will be contributed later after I re-organize what's in svn first.
llvm-svn: 73965
2009-06-23 17:48:47 +00:00
Owen Anderson
cdf2b2dfea
Add an atomic add operation.
...
llvm-svn: 73964
2009-06-23 17:39:31 +00:00
Owen Anderson
4ed41c8be8
Make the lazy initialization of DefaultTimerGroup threadsafe.
...
llvm-svn: 73963
2009-06-23 17:33:37 +00:00
Owen Anderson
891fe79672
Revert r73923, which broke clang.
...
llvm-svn: 73957
2009-06-23 16:36:10 +00:00
Sanjiv Gupta
84b581a4bd
Fold the add (ptr, offset) into ptr[offset] only if the offset is small enough. movwi and moviw allow value of 5-bits only (i.e. 32).
...
llvm-svn: 73953
2009-06-23 07:10:19 +00:00
Evan Cheng
6a42ec3e70
Minor reorg.
...
llvm-svn: 73948
2009-06-23 05:25:29 +00:00
Evan Cheng
022a726a25
Replace isTwoAddress with operand constraint.
...
llvm-svn: 73947
2009-06-23 05:23:49 +00:00
Bruno Cardoso Lopes
02a9191b71
Use a default alignment for data and bss sections.
...
Only pad when the section size > 0 and move the code that deals
with globals initializers to a place we know for sure the global
is initialized.
llvm-svn: 73944
2009-06-23 04:39:27 +00:00
Owen Anderson
e3c1aca0d9
Guard the layout info object.
...
llvm-svn: 73928
2009-06-23 00:21:15 +00:00
Owen Anderson
bee30f58fb
Guard the plugin loader.
...
llvm-svn: 73925
2009-06-23 00:02:39 +00:00
Owen Anderson
977c6b8998
Add guards around timer groups, which can be shared.
...
llvm-svn: 73923
2009-06-22 23:37:06 +00:00
Dan Gohman
53efeb0e45
Fix a bug in the trip-count computation with And/Or. If either of the
...
sides is CouldNotCompute, the resulting exact count must be CouldNotCompute.
llvm-svn: 73920
2009-06-22 23:28:56 +00:00
Bob Wilson
2e076c4e02
Add support for ARM's Advanced SIMD (NEON) instruction set.
...
This is still a work in progress but most of the NEON instruction set
is supported.
llvm-svn: 73919
2009-06-22 23:27:02 +00:00
Owen Anderson
975ce637db
Guard the statistics table.
...
llvm-svn: 73916
2009-06-22 23:08:27 +00:00
Owen Anderson
2d2ed3c54b
Guard the global annotation tables.
...
llvm-svn: 73913
2009-06-22 22:44:15 +00:00
Owen Anderson
da19a13a68
Add locking around the external function lookup table for the interpreter.
...
llvm-svn: 73912
2009-06-22 22:30:56 +00:00
Owen Anderson
e9454e8c25
Remove unneeded #include.
...
llvm-svn: 73911
2009-06-22 22:09:07 +00:00
Dan Gohman
fd76113e28
Fix a few minor issues that were exposed by the removal of SCEVHandle.
...
llvm-svn: 73910
2009-06-22 22:08:45 +00:00
Bob Wilson
e67b77028e
Add explicit types for shift count constants. This is in preparation for
...
another change that makes the types ambiguous (at least as far as tablegen
is concerned).
llvm-svn: 73909
2009-06-22 22:08:29 +00:00
Dan Gohman
2636693a3c
Fix llvm::ComputeNumSignBits to handle pointer types
...
conservatively correctly, instead of aborting.
llvm-svn: 73908
2009-06-22 22:02:32 +00:00
Owen Anderson
04052ec597
Remove the parent pointer from SCEV, since it did not end up being needed.
...
llvm-svn: 73907
2009-06-22 21:57:23 +00:00
Owen Anderson
65b6056e37
SCEVHandle is no more!
...
llvm-svn: 73906
2009-06-22 21:39:50 +00:00
Bob Wilson
482495695e
Use thumb2 for ARM architectures V6T2 and later. Fix a bug in checking
...
for "thumb" and add a check for V6T2.
llvm-svn: 73905
2009-06-22 21:28:22 +00:00
Dan Gohman
8885b379fa
Fix some typos that Duncan noticed.
...
llvm-svn: 73903
2009-06-22 21:10:22 +00:00
Bob Wilson
4582530a2c
For Darwin on ARMv6 and newer, make register r9 available for use as a
...
caller-saved register.
llvm-svn: 73901
2009-06-22 21:01:46 +00:00
Dale Johannesen
315fb72d36
Fix memcpy expansion so it won't generate invalid
...
types for the target (I think). This was breaking
the PPC32 calling sequence.
llvm-svn: 73900
2009-06-22 20:59:07 +00:00
Evan Cheng
8cbbc7944d
Fix another register coalescer crash: forgot to check if the instruction being updated has already been coalesced.
...
llvm-svn: 73898
2009-06-22 20:49:32 +00:00
Bruno Cardoso Lopes
bd9c94d7af
Use different functions to emit the string and symbol tables.
...
llvm-svn: 73895
2009-06-22 19:29:56 +00:00
Bruno Cardoso Lopes
a040566fec
Add more methods to gather target specific elf stuff
...
Support for .text relocations, implementing TargetELFWriter overloaded methods for x86/x86_64.
Use a map to track global values to their symbol table indexes
Code cleanup and small fixes
llvm-svn: 73894
2009-06-22 19:16:16 +00:00
Evan Cheng
3d75d6af57
hasFP should return true if frame address is taken.
...
llvm-svn: 73893
2009-06-22 18:38:48 +00:00
Owen Anderson
86837616f7
Banish global state from ScalarEvolution! SCEV uniquing is now done by tables attached to the ScalarEvolution pass.
...
This also throws out the SCEV reference counting scheme, as the the SCEVs now have a lifetime controlled by the
ScalarEvolution pass.
Note that SCEVHandle is now a no-op, and will be remove in a future commit.
llvm-svn: 73892
2009-06-22 18:25:46 +00:00
Bob Wilson
360eef0782
Fix llvm-gcc build for armv6t2 and later architectures. The hasV6T2Ops
...
predicate does not check if Thumb mode is enabled, and when in ARM mode
there are still some checks for constant-pool use that need to run.
llvm-svn: 73887
2009-06-22 17:29:13 +00:00
Dan Gohman
ed627385de
Make use of getUMinFromMismatchedTypes when computing backedge-taken
...
counts for loops with multiple exits, replacing more conservative code
which only handled constants. This is derived from a patch by
Nick Lewycky.
This also fixes llc aborts in ClamAV and others, as
getUMinFromMismatchedTypes takes care of balancing the types before
working with them.
llvm-svn: 73884
2009-06-22 15:09:28 +00:00
Dan Gohman
2bc22305d2
Add a getUMinFromMismatchedTypes helper function.
...
llvm-svn: 73883
2009-06-22 15:03:27 +00:00
Dan Gohman
692b46872e
Factor out code for computing umin and smin for SCEV expressions into
...
helper functions. Based on a patch by Nick Lewycky.
llvm-svn: 73869
2009-06-22 03:18:45 +00:00
Dan Gohman
96212b661c
Teach ScalarEvolution how to analyze loops with multiple exit
...
blocks, and also exit blocks with multiple conditions (combined
with (bitwise) ands and ors). It's often infeasible to compute an
exact trip count in such cases, but a useful upper bound can often
be found.
llvm-svn: 73866
2009-06-22 00:31:57 +00:00
Dan Gohman
13037149b9
Delete an unused variable.
...
llvm-svn: 73865
2009-06-22 00:19:17 +00:00
Dan Gohman
78ea89e161
Fix this code to correctly handle loops with multiple exits. Until
...
now, this hasn't mattered, because ScalarEvolution hasn't been able
to compute trip counts for loops with multiple exits. But it will
soon.
llvm-svn: 73864
2009-06-22 00:15:15 +00:00
Dan Gohman
860379bcc2
Rename a variable for consistency with the ExitBlock vs ExitingBlock
...
terminology that LoopInfo uses.
llvm-svn: 73863
2009-06-21 23:48:38 +00:00
Dan Gohman
0104842ee3
Fix ScalarEvolution's backedge-taken count computations to check for
...
overflow when computing a integer division to round up.
Thanks to Nick Lewycky for noticing this!
llvm-svn: 73862
2009-06-21 23:46:38 +00:00
Chris Lattner
2adc9e739c
rename SourceMgr::PrintError to PrintMessage.
...
llvm-svn: 73861
2009-06-21 21:22:11 +00:00
Rafael Espindola
6ead59f8ed
Fix PR4185.
...
Handle FpSET_ST0_80 being used when ST0 is still alive.
llvm-svn: 73850
2009-06-21 12:02:51 +00:00
Chris Lattner
976af622a9
move include searching logic from TGLexer to SourceMgr.
...
llvm-svn: 73845
2009-06-21 05:06:04 +00:00
Chris Lattner
fd255754af
Rename TGSourceMgr -> SourceMgr.
...
llvm-svn: 73844
2009-06-21 03:41:50 +00:00
Chris Lattner
526c8cb557
rename TGLoc -> SMLoc.
...
llvm-svn: 73843
2009-06-21 03:39:35 +00:00
Chris Lattner
1b30e1ac45
move TGSourceMgr class out of TableGen into libsupport.
...
llvm-svn: 73842
2009-06-21 03:36:54 +00:00
Chris Lattner
7719d0184a
simplify closing paren and (rip) printing.
...
llvm-svn: 73841
2009-06-21 02:22:53 +00:00
Chris Lattner
a3da048c82
indentation fix
...
llvm-svn: 73840
2009-06-21 02:22:34 +00:00
Nick Lewycky
6b8320fa5b
Expand this test to handle more cases (remainder and shifts) of zero.
...
llvm-svn: 73839
2009-06-21 01:56:41 +00:00
Chris Lattner
e80442452e
remove #if 0 code
...
llvm-svn: 73837
2009-06-21 01:48:49 +00:00
Chris Lattner
cfad3f3807
cosmetic changes.
...
llvm-svn: 73836
2009-06-21 01:27:55 +00:00
Chris Lattner
62fdd112fc
implement PR4424: 0/x is always 0 for integer division.
...
llvm-svn: 73835
2009-06-21 01:15:55 +00:00
Chris Lattner
7d2b049404
change TLS_ADDR lowering to lower to a real mem operand, instead of matching as
...
a global with that gets printed with the :mem modifier. All operands to lea's
should be handled with the lea32mem operand kind, and this allows the TLS stuff
to do this. There are several better ways to do this, but I went for the minimal
change since I can't really test this (beyond make check).
This also makes the use of EBX explicit in the operand list in the 32-bit,
instead of implicit in the instruction.
llvm-svn: 73834
2009-06-20 20:38:48 +00:00
Chris Lattner
40f560d433
remove dead code, the main codepath never has to deal
...
with MBB's.
llvm-svn: 73830
2009-06-20 19:34:47 +00:00
Chris Lattner
9c2119616f
eliminate the "call" operand modifier from the asm descriptions, modeling
...
it as a pcrel immediate instead. This gets pc-rel weirdness out of the
main printoperand codepath.
llvm-svn: 73829
2009-06-20 19:34:09 +00:00
Chris Lattner
b4b5c10477
fix edit-o
...
llvm-svn: 73824
2009-06-20 08:13:12 +00:00
Chris Lattner
9fc4db5615
some comments and cleanup
...
llvm-svn: 73818
2009-06-20 07:59:10 +00:00
Chris Lattner
a0022a772b
implement support for lowering subregs when preparing to print
...
LEA64_32r, eliminating a bunch of modifier logic stuff on addr modes.
Implement support for printing mbb labels as operands.
llvm-svn: 73817
2009-06-20 07:03:18 +00:00
Evan Cheng
c6a8d0dbe9
Fix PR4419: handle defs of partial uses.
...
llvm-svn: 73816
2009-06-20 04:34:51 +00:00
Devang Patel
79ef65a271
Remove unused field.
...
llvm-svn: 73815
2009-06-20 01:07:54 +00:00
Devang Patel
1b61c2a1ce
Initialize MMI
...
llvm-svn: 73813
2009-06-20 01:00:07 +00:00
Chris Lattner
1f8d968687
hook up printMemReference.
...
llvm-svn: 73811
2009-06-20 00:50:32 +00:00
Chris Lattner
4682015e61
Start implementing translation of MachineInstr to MCInst. Next
...
step is to make tblgen generate something more appropriate for MCInst,
and generate calls to operand translation routines where needed.
This includes a bunch of #if 0 code which will slowly be refactored into
something sensible.
llvm-svn: 73810
2009-06-20 00:49:26 +00:00
Dan Gohman
450f4e0fa9
Generalize isLoopGuardedByCond's checking to consider two
...
SCEVUnknowns with identical Instructions to be equal. This allows
it to analze cases such as the attached testcase, where the front-end
has cloned the loop controlling expression. Along with r73805, this
lets IndVarSimplify eliminate all the sign-extend casts in the
loop in the attached testcase.
llvm-svn: 73807
2009-06-20 00:35:32 +00:00
Owen Anderson
96c51a8de1
Workaround for an... interesting bug in Darwin's pthread_rwlock_init.
...
llvm-svn: 73806
2009-06-20 00:32:27 +00:00
Dan Gohman
90d612e536
Use ScalarEvolution's new GetMinSignBits and GetMinLeadingZeros
...
in the loop backedge-taken count computation of the maximum
possible trip count.
llvm-svn: 73805
2009-06-20 00:32:22 +00:00
Owen Anderson
2cda7d74bc
Forgot this file.
...
llvm-svn: 73802
2009-06-20 00:26:26 +00:00
Owen Anderson
0d2de8c35e
Revert r73790, and replace it with a significantly less ugly solution. Rather than trying to make the global reader-writer lock work,
...
create separate recursive mutexes for each value map. The recursive-ness fixes the double-acquiring issue, which having one per ValueMap
lets us continue to maintain some concurrency.
llvm-svn: 73801
2009-06-20 00:24:58 +00:00
Chris Lattner
8d284c7683
stub out some hacky code for wiring up the new asmprinter interfaces
...
on X86. Not useful yet.
llvm-svn: 73799
2009-06-19 23:59:57 +00:00
Dan Gohman
724f825f96
Fix a typo in a comment that Frits von Bommel noticed.
...
llvm-svn: 73796
2009-06-19 23:41:37 +00:00
Dan Gohman
c702fc0e64
Make GetMinTrailingZeros a member function of ScalarEvolution,
...
so that it can access the TargetData member (when available) and
use ValueTracking.h information to compute information for
SCEVUnknown Values.
Also add GetMinLeadingZeros and GetMinSignBits functions,
with minimal implementations.
llvm-svn: 73794
2009-06-19 23:29:04 +00:00
Dan Gohman
cc31110b95
Re-apply r73718, now that the fix in r73787 is in, and add a
...
hand-crafted testcase which demonstrates the bug that was exposed
in 254.gap.
llvm-svn: 73793
2009-06-19 23:23:27 +00:00
Devang Patel
88be5cf01f
DwarfWriter is used to emit EH info also.
...
llvm-svn: 73792
2009-06-19 23:21:20 +00:00
Evan Cheng
b4b20bbb7d
Enable arm pre-allocation load / store multiple optimization pass.
...
llvm-svn: 73791
2009-06-19 23:17:27 +00:00
Owen Anderson
b07dd959a4
Fix a serious bug that would cause deadlock during abstract type refinement. The constant creation
...
gets involved, and we end up trying to recursively acquire a writer lock. The fix for this is slightly horrible,
and involves passing a boolean "locked" parameter around in Constants.cpp, but it's better than having locked and
unlocked versions of most of the code.
llvm-svn: 73790
2009-06-19 23:16:19 +00:00
Dan Gohman
55e3dd9174
Fix LSR's OptimizeSMax to ignore max operators with more than 2 operands,
...
which it isn't prepared to handle.
llvm-svn: 73787
2009-06-19 23:03:46 +00:00
Devang Patel
da10358c84
mv CodeGen/DebugLoc.h Support/DebugLoc.h
...
llvm-svn: 73786
2009-06-19 22:08:58 +00:00
Devang Patel
33f4eb462f
Move up dwarf writer initialization in common AsmPrinter class.
...
llvm-svn: 73784
2009-06-19 21:54:26 +00:00
Evan Cheng
86076c9e30
Revert 73718. It's breaking 254.gap.
...
llvm-svn: 73783
2009-06-19 21:15:06 +00:00
Anton Korobeynikov
2028e25325
Unbreak cyclic deps
...
llvm-svn: 73781
2009-06-19 19:36:55 +00:00
Owen Anderson
ff5f14c15e
Fix bad paste-o in the MSVC atomics.
...
Patch by Ðван СоÑокин.
llvm-svn: 73779
2009-06-19 18:37:50 +00:00
Owen Anderson
59ba814f39
Forgot to remove some explicit locking when it became implicit in the ValueMap.
...
llvm-svn: 73778
2009-06-19 18:34:09 +00:00
Dan Gohman
b9063a84ce
Make ScalarEvolution::print print getSCEVAtScope values for
...
expressions, when interesting.
llvm-svn: 73776
2009-06-19 17:49:54 +00:00
Owen Anderson
81241a37fa
Move the memory fences out of the path for single-threaded mode.
...
llvm-svn: 73775
2009-06-19 17:45:12 +00:00
Dan Gohman
2199dbc5ff
Don't (unconditionally) use getSCEVAtScope to simplify the step
...
expression in IVUsers, because in the case of a use of a non-linear
addrec outside of a loop, this causes the addrec to be evaluated as
a linear addrec.
llvm-svn: 73774
2009-06-19 17:33:15 +00:00
Owen Anderson
ff967be708
Fix incorrect comment pointed out by Duncan.
...
llvm-svn: 73773
2009-06-19 17:20:50 +00:00
Chris Lattner
d0a363e03b
make jump threading handle lexically identical compare instructions
...
as if they were multiple uses of the same instruction. This interacts
well with the existing loadpre that j-t does to open up many new jump
threads earlier.
llvm-svn: 73768
2009-06-19 16:27:56 +00:00
Chris Lattner
3773afe931
fix the sparc codegen to not depend on the sparc asmprinter.
...
llvm-svn: 73767
2009-06-19 15:48:10 +00:00
Duncan Sands
0de39b42ff
Add support for AuroraUX. Patch by evocallaghan.
...
llvm-svn: 73766
2009-06-19 14:40:01 +00:00
Evan Cheng
d305869ca2
Add comments.
...
llvm-svn: 73761
2009-06-19 07:06:07 +00:00
Eli Friedman
2fc939c809
Fix for PR2484: add an SSE1 pattern for a shuffle we normally prefer to
...
handle with an SSE2 instruction.
llvm-svn: 73760
2009-06-19 07:00:55 +00:00
Evan Cheng
1592035e67
Should be using Bcc (average) latency to determine if-conversion threshold, not BL.
...
llvm-svn: 73759
2009-06-19 06:56:26 +00:00
Eli Friedman
495d02f4a6
Minor cleanup; fixes review comments for a previous patch. Sorry for
...
taking so long to get to this!
llvm-svn: 73757
2009-06-19 06:01:55 +00:00
Nick Lewycky
77585a24ac
Teach jump threading to look at comparisons between phi nodes and non-constants.
...
llvm-svn: 73755
2009-06-19 04:56:29 +00:00
Eli Friedman
707cbc4126
Misc tweaks to Intel asm printing to make it more compatible with MASM.
...
Patch by Benedict Gaster.
llvm-svn: 73753
2009-06-19 04:48:38 +00:00
Chris Lattner
5ca4197829
Improve tail call elim to move loads above readonly calls
...
when it allows forming a tail call. Patch by Frits van
Bommel. This implements PR4323.
llvm-svn: 73752
2009-06-19 04:22:16 +00:00
Chris Lattner
87a222c5c8
part of PR4405: disable a contentious optimization for
...
strcmp -> memcmp when the lengths of the strings are unknown.
Patch by Nick Lewycky!
llvm-svn: 73751
2009-06-19 04:17:36 +00:00
Lang Hames
6b2c960cc4
More VNInfo tweaking, plus a little progress on intra-block splitting.
...
llvm-svn: 73750
2009-06-19 02:17:53 +00:00
Evan Cheng
5d8df7ff34
Transfer dead markers when a ldrd is changed into a ldm or a pair of ldr.
...
llvm-svn: 73749
2009-06-19 01:59:04 +00:00
Evan Cheng
4e712de541
Latency information for ARM v6. It's rough and not yet hooked up. Right now we are only using branch latency to determine if-conversion limits.
...
llvm-svn: 73747
2009-06-19 01:51:50 +00:00
Eli Friedman
d984158320
Mark a few Thumb instructions commutable; just happened to spot this
...
while experimenting. I'm reasonably sure this is correct, but please
tell me if these instructions have some strange property which makes this
change unsafe.
llvm-svn: 73746
2009-06-19 01:43:08 +00:00
Chris Lattner
a08186aabc
add a file I missed, this goes with r73743
...
llvm-svn: 73744
2009-06-19 00:47:59 +00:00
Chris Lattner
3235c38dbb
Add some scaffolding for a new experimental asmprinter
...
implementation. The idea is that we want asmprinting to
work by converting MachineInstrs into a new MCInst class,
then the per-instruction asmprinter works on MCInst. MCInst
and the new asmprinters will not depend on most of the
llvm code generators. This allows building diassemblers
that don't link in the whole llvm code generator. This is
step #1 of many.
llvm-svn: 73743
2009-06-19 00:47:33 +00:00
Chris Lattner
8284b66264
merge the common darwin settings from the X86/PPC/ARM targets
...
into DarwinTargetAsmInfo.cpp. The remaining differences should
be evaluated. It seems strange that x86/arm has .zerofill but ppc
doesn't, etc.
llvm-svn: 73742
2009-06-19 00:08:39 +00:00
Chris Lattner
b84764516d
move mangler quote handling from asm printers to TargetAsmInfo.
...
llvm-svn: 73738
2009-06-18 23:41:35 +00:00
Chris Lattner
4df8e5c800
minor cleanup
...
llvm-svn: 73737
2009-06-18 23:33:13 +00:00
Chris Lattner
09081b25a5
simplify macro debug info directive handling.
...
llvm-svn: 73736
2009-06-18 23:31:37 +00:00
Evan Cheng
a0ca298f8a
Remove UseThumbBacktraces. Just check if subtarget is darwin.
...
llvm-svn: 73734
2009-06-18 23:14:30 +00:00
Owen Anderson
38830b19e9
Add a parent pointer to SCEV, in preparation for getting rid of the global uniquing tables. No functionality change.
...
llvm-svn: 73728
2009-06-18 22:25:12 +00:00
Lang Hames
32270cc78e
Improved PHI def marking, replaced some gotos with breaks.
...
llvm-svn: 73727
2009-06-18 22:01:47 +00:00
Owen Anderson
b614f1e13c
Simplify.
...
llvm-svn: 73725
2009-06-18 21:35:56 +00:00
Owen Anderson
7f1ef67a7b
Simplify.
...
llvm-svn: 73723
2009-06-18 20:56:48 +00:00
Owen Anderson
5a6960fcc3
Add a SmartScopedLock, and use it to simplify code.
...
llvm-svn: 73722
2009-06-18 20:51:00 +00:00
Owen Anderson
a6dc7456e1
Simplify with SmartRWMutex.
...
llvm-svn: 73721
2009-06-18 20:44:31 +00:00
Evan Cheng
de9e36a74e
On Darwin, ams printer should output a second label before a jump table so the linker knows it's a new atom. But this is only needed if the jump table is put in a separate section from the function body.
...
llvm-svn: 73720
2009-06-18 20:37:15 +00:00
Owen Anderson
5e1f6d95a2
Simplify by using no-op-when-not-multithreaded locks.
...
llvm-svn: 73719
2009-06-18 20:36:21 +00:00
Dan Gohman
8c9ac59455
Generalize LSR's OptimizeSMax to handle unsigned max tests as well
...
as signed max tests. Along with r73717, this helps CodeGen avoid
emitting code for a maximum operation for this class of loop.
llvm-svn: 73718
2009-06-18 20:23:18 +00:00
Dan Gohman
4d3c3cfffd
Recognize n != 0 ? n : 1 as umax(n, 1). Previously only ULT/UGT/ULE/UGE
...
comparisons were recognized for umax, but instcombine canonicalizes
unsigned comparisons with zero to this simpler form.
llvm-svn: 73717
2009-06-18 20:21:07 +00:00
Owen Anderson
830ff50abf
Simplify using mutexes that become no-ops when not in multithreaded mode.
...
llvm-svn: 73716
2009-06-18 20:15:26 +00:00
Anton Korobeynikov
6ee547bb1b
Revert IRBuilder CC propagation. Fix SimplifyLibCalls instead.
...
llvm-svn: 73715
2009-06-18 20:05:31 +00:00
Owen Anderson
d830eb8365
Simplify a lot of code by using a R/W mutex that becomes a no-op when multithreading is disabled.
...
llvm-svn: 73714
2009-06-18 19:10:19 +00:00
Owen Anderson
fa107259fe
Use SmartMutex to simplify.
...
llvm-svn: 73712
2009-06-18 18:36:34 +00:00
Owen Anderson
1498a7a510
Give RWMutex the SmartRWMutex treatment too.
...
llvm-svn: 73710
2009-06-18 18:26:15 +00:00
Owen Anderson
68f6598c69
Insert a SmartMutex templated class into the class hierarchy, which takes a template parameter specifying whether this mutex
...
should become a no-op when not running in multithreaded mode. Make sys::Mutex a typedef of SmartMutex<false>, to preserve source compatibility.
llvm-svn: 73709
2009-06-18 17:53:17 +00:00
Ted Kremenek
81ef65d491
Update CMake files to account for new location of Threading.cpp.
...
llvm-svn: 73708
2009-06-18 17:47:09 +00:00
Owen Anderson
7d42b95b6c
Move Threading.[h|cpp] from Support to System.
...
llvm-svn: 73707
2009-06-18 16:54:52 +00:00
Dan Gohman
a0348809b6
Remove the code from IVUsers that attempted to handle
...
casted induction variables in cases where the cast
isn't foldable. It ended up being a pessimization in
many cases. This could be fixed, but it would require
a bunch of complicated code in IVUsers' clients. The
advantages of this approach aren't visible enough to
justify it at this time.
llvm-svn: 73706
2009-06-18 16:54:06 +00:00
Dan Gohman
56bd02c55c
Generalize the zext(trunc(t) & C) instcombine to work even with
...
C is not a low-bits mask, and add a similar instcombine for
zext((trunc(t) & C) ^ C).
llvm-svn: 73705
2009-06-18 16:30:21 +00:00
Dan Gohman
5a728c908c
Update a comment to reflect the code.
...
llvm-svn: 73704
2009-06-18 16:24:47 +00:00
Owen Anderson
c5eb1ee4b7
Fix the double checked locking in this file too.
...
llvm-svn: 73703
2009-06-18 16:17:42 +00:00
Owen Anderson
0fd4eaef30
As pointed out by Duncan, I accidentally dropped the first MemoryFence of the
...
double-checked locking pattern here.
llvm-svn: 73701
2009-06-18 16:08:27 +00:00
Owen Anderson
6eb4a73633
Fix build when disable thread support.
...
Patch by Howard Su.
llvm-svn: 73680
2009-06-18 04:44:46 +00:00
Nick Lewycky
87c4a05008
Add braces to clarify if/else structure and remove warning.
...
llvm-svn: 73673
2009-06-18 03:01:42 +00:00
Evan Cheng
0e79603588
- Update register allocation hint after coalescing. This is done by the target since the hint is target dependent. This is important for ARM register pair hints.
...
- Register allocator should resolve the second part of the hint (register number) before passing it to the target since it knows virtual register to physical register mapping.
- More fixes to get ARM load / store double word working.
llvm-svn: 73671
2009-06-18 02:04:01 +00:00
Dale Johannesen
9d9acb065a
It looks like nobody is working on PR 4158, so I'm
...
adding a check to catch this case at compile time
instead of quietly generating incorrect code.
That will at least let us identify CBE failures
that are not due to this problem.
llvm-svn: 73668
2009-06-18 01:07:23 +00:00
Dan Gohman
94c468f419
Fix trailing whitespace from ScalarEvolution::print.
...
llvm-svn: 73666
2009-06-18 00:37:45 +00:00
Bob Wilson
86c12d7bc4
ARM unified syntax is not specific to ELF; use it for Darwin, too.
...
llvm-svn: 73665
2009-06-18 00:36:17 +00:00
Dan Gohman
eddf77123a
Teach ScalarEvolution how to recognize another xor(and(x, C), C) case.
...
If C is a single bit and the and gets analyzed as a truncate and
zero-extend, the xor can be represnted as an add.
llvm-svn: 73664
2009-06-18 00:00:20 +00:00
Dan Gohman
4d8723d47f
Delete unnecessary braces.
...
llvm-svn: 73663
2009-06-17 23:54:37 +00:00
Owen Anderson
ed14e767e8
Reapply r73647 in a non-broken form.
...
llvm-svn: 73662
2009-06-17 23:49:06 +00:00
Anton Korobeynikov
5658086052
Fix asm string from MOVi16
...
llvm-svn: 73661
2009-06-17 23:43:36 +00:00
Anton Korobeynikov
f687a828b2
Thumb2 instructions are enabled only in unified assembler mode.
...
Emit switch directive for it. I have no idea whether this is
requirement for Darwin or not.
llvm-svn: 73660
2009-06-17 23:43:18 +00:00
Dan Gohman
7f836c7c61
Instcombine zext(trunc(x) & mask) to x&mask, even if the trunc has
...
multiple users.
llvm-svn: 73656
2009-06-17 23:17:05 +00:00
Owen Anderson
89ee957cbd
Use double-checked locking for this lazy initialization.
...
llvm-svn: 73653
2009-06-17 22:53:57 +00:00
Owen Anderson
aab59c52cf
Protect the GC table in Function.cpp
...
llvm-svn: 73647
2009-06-17 22:23:31 +00:00
Owen Anderson
b299d40d5a
Use atomic increment here.
...
llvm-svn: 73643
2009-06-17 22:01:09 +00:00
Owen Anderson
c7b91a0820
Thread-safe (and ManagedStatic-ized) LeakDetector!
...
llvm-svn: 73642
2009-06-17 21:56:05 +00:00
Owen Anderson
0dd39fdf96
Guard mutation of the timing info global.
...
llvm-svn: 73639
2009-06-17 21:28:54 +00:00
Owen Anderson
eae9772679
We need to use double-checked locking for lazy initialization in this case when running multithreaded.
...
llvm-svn: 73636
2009-06-17 21:16:20 +00:00
Lang Hames
16cab1935e
VNInfo cleanup.
...
llvm-svn: 73634
2009-06-17 21:01:20 +00:00
Dale Johannesen
81b6463ed0
This fixes a bug introduced in 72661, which can
...
move loads back past a check that the load address
is valid, see new testcase. The test that went
in with 72661 has exactly this case, except that
the conditional it's moving past is checking
something else; I've settled for changing that
test to reference a global, not a pointer. It
may be possible to scan all the tests you pass and
make sure none of them are checking any component
of the address, but it's not trivial and I'm not
trying to do that here.
llvm-svn: 73632
2009-06-17 20:48:23 +00:00
Owen Anderson
f89c38cace
Factor out some common code.
...
llvm-svn: 73631
2009-06-17 20:43:39 +00:00
Owen Anderson
65c5cd728e
Add an RAII ScopedWriter, which allows one to acquire a writer lock for the duration of a scope. Simplify a lot of uses of
...
writer locks in Constants.cpp by using it.
llvm-svn: 73630
2009-06-17 20:34:43 +00:00
Owen Anderson
61794049e4
Simplify the locking on the Constants tables, and make it more efficient, by pushing it into the ValueMap from the callers.
...
Document those ValueMap functions that are _not_ locked, so that callers are aware that they need to do the locking themselves.
llvm-svn: 73628
2009-06-17 20:10:08 +00:00
Torok Edwin
ba93ea7632
Add debug message about non-local loads being clobbered.
...
llvm-svn: 73625
2009-06-17 18:48:18 +00:00
Owen Anderson
2d7231d4c3
Type safety for Constants.cpp! Some of this is temporary, as I'm planning to push some of the R/W locking into FoldingSet.
...
llvm-svn: 73624
2009-06-17 18:40:29 +00:00
Anton Korobeynikov
02bb33c58d
Initial support for some Thumb2 instructions.
...
Patch by Viktor Kutuzov and Anton Korzh from Access Softek, Inc.
llvm-svn: 73622
2009-06-17 18:13:58 +00:00
Dan Gohman
d8329e8378
Update comments to use doxygen syntax.
...
llvm-svn: 73621
2009-06-17 17:51:33 +00:00
Owen Anderson
4b660a8da7
Protect the ValueHandle table.
...
llvm-svn: 73620
2009-06-17 17:36:57 +00:00
Owen Anderson
e5fdd0b5d1
We need to guard reads of the AbstractTypeUsers list, as well as writes to it. While it would be nice to use a R/W lock here,
...
we can't, because it HAS to be recursive.
llvm-svn: 73617
2009-06-17 17:13:54 +00:00