Eric Christopher
d9e8eac235
80-col fixups.
...
llvm-svn: 121356
2010-12-09 04:48:06 +00:00
Wesley Peck
4c196543f5
Reworking the stack layout generated by the MBlaze backend.
...
llvm-svn: 121355
2010-12-09 03:42:04 +00:00
Owen Anderson
817b7cd7b8
Fix encoding of the immediate operands on post-indexed LDR and friends.
...
llvm-svn: 121354
2010-12-09 02:56:12 +00:00
Dan Gohman
a32986e899
Really check that the bits that will become zero are actually already zero
...
before eliminating the operation that zeros them. This fixes rdar://8739316.
llvm-svn: 121353
2010-12-09 02:52:17 +00:00
Eric Christopher
2a2e65c452
Fix up some comments.
...
llvm-svn: 121351
2010-12-09 01:57:45 +00:00
Owen Anderson
3e6ee1db3e
Fix Thumb2 fixups for ldr.
...
llvm-svn: 121350
2010-12-09 01:51:07 +00:00
Jim Grosbach
6233189713
Add a textual message to the assert.
...
llvm-svn: 121349
2010-12-09 01:23:51 +00:00
Jim Grosbach
ed40288eb4
Add a sanity check assert() for t2ADD/SUBrSPi instructions that they really are
...
referencing the stack pointer as they say they are.
llvm-svn: 121347
2010-12-09 01:22:19 +00:00
Jim Grosbach
bd30afe4c2
When using multiple instructions to reference a frame index, make sure to
...
update the opcode when necessary as well as the source register.
llvm-svn: 121346
2010-12-09 01:22:13 +00:00
Jim Grosbach
0b2630c500
The add/sub SP instructions are really pseudos. The assembler should ignore
...
them.
llvm-svn: 121345
2010-12-09 01:21:27 +00:00
Jakob Stoklund Olesen
e6dc3c899e
IntervalMap iterators are heavyweight, so avoid copying them around and use
...
references instead.
Similarly, IntervalMap::begin() is almost as expensive as find(), so use find(x)
instead of begin().advanceTo(x);
This makes RegAllocBasic run another 5% faster.
llvm-svn: 121344
2010-12-09 01:06:52 +00:00
Matt Beaumont-Gay
eb369f84ec
Remove unused variables
...
llvm-svn: 121343
2010-12-09 01:04:43 +00:00
Owen Anderson
14e41271b7
Fix typo in Thumb2 branch fixup.
...
llvm-svn: 121342
2010-12-09 01:02:09 +00:00
Eric Christopher
8783074091
Stop confusing people, it's not really a chain, or a tumor.
...
llvm-svn: 121340
2010-12-09 00:57:19 +00:00
Bill Wendling
f75412dec7
Remove extraneous semicolon.
...
llvm-svn: 121338
2010-12-09 00:51:54 +00:00
Bill Wendling
c4d333f02a
Attempt to make the bit-twiddling readable resulted in the binary value being
...
overwritten.
llvm-svn: 121337
2010-12-09 00:44:33 +00:00
Bill Wendling
3392bfc8f3
The BLX instruction is encoded differently than the BL, because why not? In
...
particular, the immediate has 20-bits of value instead of 21. And bit 0 is '0'
always. Going through the BL fixup encoding was trashing the "bit 0 is '0'"
invariant.
Attempt to get the encoding at slightly more correct with this.
llvm-svn: 121336
2010-12-09 00:39:08 +00:00
Eric Christopher
d84970ae8b
Remove extraneous copy from DAG conversion for darwin tls. This was
...
popping up at O0 when it wasn't folded and the fast allocator would
complain.
llvm-svn: 121330
2010-12-09 00:27:58 +00:00
Owen Anderson
302d5fd0d8
Fix Thumb2 BCC encoding and fixups.
...
llvm-svn: 121329
2010-12-09 00:27:41 +00:00
Eric Christopher
c2dc95ae00
Add rsp to the uses for the same reason as 32-bit.
...
llvm-svn: 121328
2010-12-09 00:26:41 +00:00
Devang Patel
c26da9005b
DW_FORM_data1 may not provide sufficient room for vtable index, use _udata instead.
...
This fixes radar 8730409.
llvm-svn: 121323
2010-12-09 00:10:40 +00:00
Kevin Enderby
87bc591fc5
Allow a slash, '/', as a prefix separator for X86. rdar://8741045
...
llvm-svn: 121320
2010-12-08 23:57:59 +00:00
Jakob Stoklund Olesen
8c5f0c3115
Properly deal with empty intervals when checking for interference.
...
llvm-svn: 121319
2010-12-08 23:51:35 +00:00
Jason W Kim
e296ee830a
Style nit and whitespace cleanup
...
llvm-svn: 121317
2010-12-08 23:35:25 +00:00
Eric Christopher
6a21b40bd6
Move this test to tlv* to make it easier to notice versus linux tls
...
support.
llvm-svn: 121316
2010-12-08 23:33:23 +00:00
Jim Grosbach
9672c9a793
Clean up the add/sub w/ SP source reg instructions in Thumb2 a bit. Add a FIXME
...
for more thorough cleanup.
llvm-svn: 121315
2010-12-08 23:30:19 +00:00
Jim Grosbach
a5c666654e
Fix T2TwoRegImm and use it for t2ADDrSPi12 and friends.
...
llvm-svn: 121314
2010-12-08 23:24:29 +00:00
Jason W Kim
ba8b6d9a1c
Removed dead comment.
...
llvm-svn: 121313
2010-12-08 23:19:44 +00:00
Jason W Kim
c79c5f6e8c
ARM/MC/ELF TPsoft is now a proper pseudo inst.
...
Added test to check bl __aeabi_read_tp gets emitted properly for ELF/ASM
as well as ELF/OBJ (including fixup)
Also added support for ELF::R_ARM_TLS_IE32
llvm-svn: 121312
2010-12-08 23:14:44 +00:00
Jim Grosbach
e829c674bb
T2TwoRegImm isn't right for t2SUBrSPi12. Use T2I instead.
...
llvm-svn: 121311
2010-12-08 23:13:01 +00:00
Jim Grosbach
fd0e4c0fe9
Add operand encoding for Thumb2 subw SP + imm. rdar://8745434
...
llvm-svn: 121310
2010-12-08 23:12:09 +00:00
Jim Grosbach
51937f9963
Add operand encoding for Thumb2 addw Rn + imm. rdar://8745434
...
llvm-svn: 121309
2010-12-08 23:04:16 +00:00
Bill Wendling
a7d6aa902a
Support the "target" encodings for the CB[N]Z instructions.
...
llvm-svn: 121308
2010-12-08 23:01:43 +00:00
Evan Cheng
7f3e9150d0
Fix an obvious cut-n-paste error.
...
llvm-svn: 121307
2010-12-08 23:01:18 +00:00
Jakob Stoklund Olesen
eaa650a945
Implement very primitive hinting support in RegAllocGreedy.
...
The hint is simply tried first and then forgotten if it couldn't be allocated
immediately.
llvm-svn: 121306
2010-12-08 22:57:16 +00:00
Jim Grosbach
663e4ce357
Add operand encoding for Thumb2 addw SP + imm. rdar://8745434
...
llvm-svn: 121305
2010-12-08 22:50:19 +00:00
Jim Grosbach
47e3cc54f8
Parameterize opcode encoding bits for Thumb2 extended precision integer
...
multiply instructions.
llvm-svn: 121301
2010-12-08 22:38:41 +00:00
Bob Wilson
4868ba0619
Add operators for "_lane" variants of some saturating Neon multiply intrinsics
...
so they can be implemented without separate clang builtins.
llvm-svn: 121299
2010-12-08 22:36:08 +00:00
Jim Grosbach
c3b0b10708
Fix operand encoding for Thumb2 extended precision multiplies. rdar://8745555
...
llvm-svn: 121297
2010-12-08 22:29:28 +00:00
Jakob Stoklund Olesen
e0df786c98
Store (priority,regnum) pairs in the priority queue instead of providing an
...
abstract priority queue interface in subclasses that want to override the
priority calculations.
Subclasses must provide a getPriority() implementation instead.
This approach requires less code as long as priorities are expressable as simple
floats, and it avoids the dangers of defining potentially expensive priority
comparison functions.
It also should speed up priority_queue operations since they no longer have to
chase pointers when comparing registers. This is not measurable, though.
Preferably, we shouldn't use floats to guide code generation. The use of floats
here is derived from the use of floats for spill weights. Spill weights have a
dynamic range that doesn't lend itself easily to a fixpoint implementation.
When someone invents a stable spill weight representation, it can be reused for
allocation priorities.
llvm-svn: 121294
2010-12-08 22:22:41 +00:00
Eric Christopher
1b93e7b4ed
Reword comment slightly.
...
llvm-svn: 121293
2010-12-08 22:21:42 +00:00
Lang Hames
ce333073af
Fixed some dependencies in RegAllocPBQP.h . Thanks to Borja Ferrer for pointing out this issue.
...
llvm-svn: 121292
2010-12-08 22:15:32 +00:00
Jim Grosbach
572e56dfb2
Simplify T2 operand assignment notation a bit. No need to specify a bit range
...
for the source field when it's the whole thing that's being referenced.
llvm-svn: 121291
2010-12-08 22:10:43 +00:00
Devang Patel
8817135cb9
Use type's file info while describing inheritance relationship.
...
llvm-svn: 121289
2010-12-08 21:46:37 +00:00
Bob Wilson
dbe9e7e3dd
Add operators for vabdl and vabal so they can be implemented without builtins.
...
llvm-svn: 121287
2010-12-08 21:39:04 +00:00
Bob Wilson
bf74755e62
Remove unused function parameter.
...
llvm-svn: 121286
2010-12-08 21:39:00 +00:00
Eric Christopher
66a8bf57ea
Fix comment.
...
llvm-svn: 121285
2010-12-08 21:35:09 +00:00
Jakob Stoklund Olesen
310916a22d
Trim includes.
...
llvm-svn: 121283
2010-12-08 21:12:00 +00:00
Devang Patel
b68c6231e9
Add support to create debug info for functions and methods.
...
llvm-svn: 121281
2010-12-08 20:42:44 +00:00
Jim Grosbach
3c68561453
Tweak ARM fixup value adjustments for Thumb to better handle the half-word
...
ordering of thumb mode.
llvm-svn: 121280
2010-12-08 20:32:07 +00:00
Devang Patel
81c3c87717
Add support to create class type.
...
llvm-svn: 121279
2010-12-08 20:18:20 +00:00
Bob Wilson
194ad82666
Add an operator for vaba so it can be implemented using vabd.
...
llvm-svn: 121276
2010-12-08 20:09:10 +00:00
Andrew Trick
00067fb147
Generalize PostRAHazardRecognizer so it can be used in any pass for
...
both forward and backward scheduling. Rename it to
ScoreboardHazardRecognizer (Scoreboard is one word). Remove integer
division from the scoreboard's critical path.
llvm-svn: 121274
2010-12-08 20:04:29 +00:00
Bill Wendling
55bc7187ac
Use this new fangled StringSwitch technology.
...
llvm-svn: 121273
2010-12-08 20:02:49 +00:00
Owen Anderson
dae32fd206
Improve comment.
...
llvm-svn: 121272
2010-12-08 19:31:11 +00:00
Jim Grosbach
d18f98b969
Add initializer.
...
llvm-svn: 121262
2010-12-08 15:36:45 +00:00
Bill Wendling
4182a16930
Cleanup table a bit.
...
llvm-svn: 121250
2010-12-08 13:03:15 +00:00
Evan Cheng
9d54ae6332
Add comments.
...
llvm-svn: 121238
2010-12-08 06:29:02 +00:00
Jakob Stoklund Olesen
b8812a1c15
Stub out RegAllocGreedy.
...
This new register allocator is initially identical to RegAllocBasic, but it will
receive all of the tricks that RegAllocBasic won't get.
RegAllocGreedy will eventually replace linear scan.
llvm-svn: 121234
2010-12-08 03:26:16 +00:00
Bill Wendling
7a05f00ade
Fix newlines.
...
llvm-svn: 121233
2010-12-08 02:46:25 +00:00
Daniel Dunbar
c1c4e9589a
build: Shared libraries shouldn't used RPATH on Darwin, only main executables
...
should use that.
llvm-svn: 121231
2010-12-08 02:29:26 +00:00
Eric Christopher
8d842da572
Regenerate this for Daniel.
...
llvm-svn: 121227
2010-12-08 02:02:14 +00:00
Bill Wendling
8a6449c46e
Add support for loading from a constant pool.
...
llvm-svn: 121226
2010-12-08 01:57:09 +00:00
Devang Patel
89ea4f27a8
Add support to create vector, array, enums etc...
...
llvm-svn: 121224
2010-12-08 01:50:15 +00:00
Daniel Dunbar
21e71e948b
build: Don't force -flat_namespace or '-undefined suppress' on unsuspecting users of LLVM makefiles, these options really shouldn't be used on Darwin.
...
llvm-svn: 121223
2010-12-08 01:48:05 +00:00
Daniel Dunbar
00e7a8459b
autoconf: Stop lying to me.
...
llvm-svn: 121222
2010-12-08 01:48:03 +00:00
Jim Grosbach
87055ed6f4
Let target asm backends see assembler flags as they go by. Use that to handle
...
thumb vs. arm mode differences in WriteNopData().
llvm-svn: 121219
2010-12-08 01:16:55 +00:00
Jakob Stoklund Olesen
5885e99405
Move RABasic::addMBBLiveIns to the base class, it is generally useful.
...
Minor optimization to the use of IntervalMap iterators. They are fairly
heavyweight, so prefer SI.valid() over SI != end().
llvm-svn: 121217
2010-12-08 01:06:06 +00:00
Owen Anderson
72ce453c73
Simplify the byte reordering logic slightly.
...
llvm-svn: 121216
2010-12-08 00:21:33 +00:00
Owen Anderson
0f7142d808
VLDR fixups need special handling under Thumb. While the encoding is the same,
...
the order of the bytes in the data stream is flipped around.
llvm-svn: 121215
2010-12-08 00:18:36 +00:00
Bob Wilson
97b44b5b4a
Add operators for vadd[lw] and vsub[lw]
...
so they can be implemented without clang builtins.
llvm-svn: 121213
2010-12-08 00:14:04 +00:00
Devang Patel
dd261afdd9
Global variable does not need linkage name.
...
llvm-svn: 121212
2010-12-08 00:06:22 +00:00
Devang Patel
63f83cd861
Add support to create local variable's debug info.
...
llvm-svn: 121211
2010-12-07 23:58:00 +00:00
Bob Wilson
c40935fa0c
Add operators for vmlal{_n,_lane} and vmlsl{_n,_lane}
...
so they can be implemented without clang builtins.
llvm-svn: 121209
2010-12-07 23:53:37 +00:00
Bob Wilson
7a36c68748
Emit vmovl intrinsics first in the arm_neon.h header
...
so they can be used in the implementations of other intrinsics.
llvm-svn: 121208
2010-12-07 23:53:32 +00:00
Rafael Espindola
6624f47272
Layout each section independently. With the testcase in PR8711:
...
before:
4 assembler - Number of assembler layout and relaxation steps
78563 assembler - Number of emitted assembler fragments
8693904 assembler - Number of emitted object file bytes
271223 assembler - Number of evaluated fixups
330771677 assembler - Number of fragment layouts
5958 assembler - Number of relaxed instructions
2508361 mcexpr - Number of MCExpr evaluations
real 0m26.123s
user 0m25.694s
sys 0m0.388s
after:
4 assembler - Number of assembler layout and relaxation steps
78563 assembler - Number of emitted assembler fragments
8693904 assembler - Number of emitted object file bytes
271223 assembler - Number of evaluated fixups
231507 assembler - Number of fragment layouts
5958 assembler - Number of relaxed instructions
2508361 mcexpr - Number of MCExpr evaluations
real 0m2.500s
user 0m2.113s
sys 0m0.273s
And yes, the outputs are identical :-)
llvm-svn: 121207
2010-12-07 23:32:26 +00:00
Matt Beaumont-Gay
56de7c2773
Fix a warning about a variable which is only used in an assertion.
...
llvm-svn: 121206
2010-12-07 23:26:21 +00:00
Devang Patel
746660fc7b
Add support to create variables, structs etc.. using DIBuilder.
...
This is still work in progress.
llvm-svn: 121205
2010-12-07 23:25:47 +00:00
Jakob Stoklund Olesen
db357d71f1
Switch LiveIntervalUnion from std::set to IntervalMap.
...
This speeds up RegAllocBasic by 20%, not counting releaseMemory which becomes
way faster.
llvm-svn: 121201
2010-12-07 23:18:47 +00:00
Jakob Stoklund Olesen
e702cde2dd
Fix begin() and end() on const IntervalMap.
...
llvm-svn: 121200
2010-12-07 23:18:43 +00:00
Bill Wendling
f09c44c7ab
Cleanup in the Darwin end. No functionality change.
...
llvm-svn: 121198
2010-12-07 23:11:00 +00:00
Evan Cheng
775ead3293
Fix a bad prologue / epilogue codegen bug where the compiler would emit illegal
...
vpush instructions to save / restore VFP / NEON registers like this:
vpush {d8,d10,d11}
vpop {d8,d10,d11}
vpush and vpop do not allow gaps in the register list.
rdar://8728956
llvm-svn: 121197
2010-12-07 23:08:38 +00:00
Jim Grosbach
fb116aed60
Add source Record* reference to PatternToMatch. Allows better diagnostics.
...
llvm-svn: 121196
2010-12-07 23:05:49 +00:00
Bill Wendling
721724e643
A bit of cleanup: early exit ApplyFixup and cache the Fixup offset. No
...
functionality change.
llvm-svn: 121195
2010-12-07 23:05:20 +00:00
Bob Wilson
361afe4ef2
Add an operator for vdup_lane so it can be implemented without a clang builtin.
...
llvm-svn: 121190
2010-12-07 22:39:24 +00:00
Bob Wilson
17a233c0e5
Add an operator for vmull_lane so it can be implemented without a clang builtin.
...
llvm-svn: 121187
2010-12-07 22:02:48 +00:00
Jim Grosbach
49bcd6ff85
Binary encoding for ARM tLDRspi and tSTRspi.
...
llvm-svn: 121186
2010-12-07 21:50:47 +00:00
Devang Patel
eea0fd0942
Handle recursive values. Add comments.
...
llvm-svn: 121184
2010-12-07 21:12:05 +00:00
Owen Anderson
cf096a431a
Fix Thumb2 encoding of the S bit.
...
llvm-svn: 121182
2010-12-07 20:50:15 +00:00
Jim Grosbach
f878e62a0d
Remove reference to the CMPz instruction patterns for ARM.
...
llvm-svn: 121180
2010-12-07 20:44:33 +00:00
Jim Grosbach
327cf8ee5f
Refactor the ARM CMPz* patterns to just use the normal CMP instructions when
...
possible. They were duplicates for everything exception the source pattern
before.
llvm-svn: 121179
2010-12-07 20:41:06 +00:00
Evan Cheng
de75ab9a09
Code clean up; no functionality change.
...
llvm-svn: 121176
2010-12-07 20:11:46 +00:00
Bob Wilson
192336b865
Add new built-in operations for vmull and vmull_n
...
so they can be implemented without requiring clang builtins.
Radar 8446238.
llvm-svn: 121173
2010-12-07 20:02:45 +00:00
Evan Cheng
c27c956966
Code clean up; no functionality change.
...
llvm-svn: 121172
2010-12-07 19:59:34 +00:00
Dan Gohman
f844b3b227
Remove the code from Function::dropAllReferences which replaced
...
uses of the function's blocks with undef. This code isn't needed,
because BasicBlock's destructor handles such uses. Also, undef isn't
correct, since blockaddresses may still be used for comparisons
with null.
llvm-svn: 121170
2010-12-07 19:56:51 +00:00
Jim Grosbach
8656d82b5b
Trailing whitespace.
...
llvm-svn: 121167
2010-12-07 19:36:07 +00:00
Jim Grosbach
e99956eb3e
Change assert to diagnostic. Message still needs work, but it's better than
...
an assert, at least.
llvm-svn: 121166
2010-12-07 19:35:36 +00:00
Bruno Cardoso Lopes
b9bfd0945a
Remove target specific node MipsISD::CMov, which is not used because all conditional moves are directly matched using tablegen patterns. If there's a need in the future, we can introduce it again
...
llvm-svn: 121164
2010-12-07 19:04:14 +00:00
Bruno Cardoso Lopes
f0c6e3780d
Match a pattern generated by a dag combiner opt where:
...
(select (load (load tga0)) (load tga1)) => (load (select (load tga0) tga1))
Thanks to Akira for pointing that.
llvm-svn: 121163
2010-12-07 19:00:20 +00:00
Jakob Stoklund Olesen
fb207c1cb9
Simplify assertion.
...
llvm-svn: 121162
2010-12-07 18:51:27 +00:00
Michael J. Spencer
355ac5f622
Missed a spot removing Alarm.
...
llvm-svn: 121161
2010-12-07 18:50:33 +00:00
Michael J. Spencer
8b5defbd5d
Support: Remove Alarm. It is unused (via local grep and google code search).
...
llvm-svn: 121160
2010-12-07 18:41:59 +00:00
Michael J. Spencer
a68282caa8
Support/PathV2: Remove const from bool return types.
...
llvm-svn: 121157
2010-12-07 18:12:07 +00:00
Michael J. Spencer
d77c17417a
Fix spelling.
...
llvm-svn: 121156
2010-12-07 18:11:54 +00:00
Michael J. Spencer
fec9bb59e3
Support: Remove DynamicLinker.h. It is unused and unimplemented.
...
llvm-svn: 121155
2010-12-07 18:11:38 +00:00
Jim Grosbach
6e517d658e
Encode the literal field for tCMPzi instruction.
...
llvm-svn: 121153
2010-12-07 17:48:24 +00:00
Rafael Espindola
e78d3b38de
Fix absolute recording of differences of symbols in two sections. Reduced from ctor_dtor_count-2.cpp.
...
llvm-svn: 121152
2010-12-07 17:12:32 +00:00
Michael J. Spencer
f616b218c8
Support/PathV2: Change most functions in the path namespace to return their work
...
via their return value instead of an out parameter.
llvm-svn: 121149
2010-12-07 17:04:04 +00:00
Daniel Dunbar
82ebae7631
build: Go back to dropping __eprintf reference when building with Clang, see
...
comment.
llvm-svn: 121146
2010-12-07 16:29:44 +00:00
Benjamin Kramer
cfa9a893df
Add parens to pacify gcc.
...
llvm-svn: 121142
2010-12-07 15:50:35 +00:00
Frits van Bommel
d2f4b09e10
Remove some dead code from the jump threading pass.
...
The last uses of these functions were removed in r113852 when LazyValueInfo was permanently enabled and removed the need for them.
llvm-svn: 121133
2010-12-07 13:08:07 +00:00
Frits van Bommel
716f34c6fb
CMake: Fix warning in gtest header used by unit tests.
...
llvm-svn: 121127
2010-12-07 10:22:07 +00:00
Jay Foad
583abbc4df
PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and
...
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method
trunc(), to be const and to return a new value instead of modifying the
object in place.
llvm-svn: 121120
2010-12-07 08:25:19 +00:00
Owen Anderson
10e1b56e2c
Don't leak the mutex when loading dynamic libraries.
...
llvm-svn: 121119
2010-12-07 07:56:20 +00:00
NAKAMURA Takumi
182ea825a9
utils/lit/lit/TestFormats.py: [PR8438] unittests: Seek *Tests (not BUILD_MODE/*Tests) under whole unittests/ if BUILD_MODE == '.'
...
llvm-svn: 121118
2010-12-07 07:41:32 +00:00
NAKAMURA Takumi
7291ebc353
unittests/CMakeLists.txt: Tweak unittests' layout to be identical to GNU build.
...
llvm-svn: 121117
2010-12-07 07:41:23 +00:00
Rafael Espindola
bdbe5a712d
Fix relocations with weak definitions.
...
llvm-svn: 121114
2010-12-07 05:57:28 +00:00
NAKAMURA Takumi
98c9ae3761
Revert test/Archive/check_binary_output.ll". It fails on a buildbot.
...
llvm-svn: 121113
2010-12-07 05:57:02 +00:00
Chris Lattner
0d71c4f564
reapply r121100 with a tweak to constant fold ConstExprs with TargetData
...
(if available) as we go so that we get simple constantexprs not insane ones.
This fixes the failure of clang/test/CodeGenCXX/virtual-base-ctor.cpp
that the previous iteration of this patch had.
llvm-svn: 121111
2010-12-07 04:33:29 +00:00
Michael J. Spencer
bfea3c739d
Support/PathV2: Cleanup separator handling.
...
llvm-svn: 121110
2010-12-07 03:57:48 +00:00
Michael J. Spencer
1e090f0b8f
Support/PathV2: Remove the error_code return type from all functions in the path
...
namespace. None of them return anything except for success anyway. These will be
converted to returning their result soon.
llvm-svn: 121109
2010-12-07 03:57:37 +00:00
Michael J. Spencer
92903a3339
Support/PathV2: Move make_absolute from path to fs.
...
llvm-svn: 121108
2010-12-07 03:57:17 +00:00
Rafael Espindola
2eabaae459
Fix pcrel relocations that cross sections.
...
llvm-svn: 121107
2010-12-07 03:50:14 +00:00
NAKAMURA Takumi
1576fd7172
test/Archive/check_binary_output.ll: Add a new test to check output of 'llvm-ar -p' is sane. Thanks to Danil Malyshev!
...
llvm-svn: 121106
2010-12-07 03:35:20 +00:00
NAKAMURA Takumi
2a61f4e364
test/Other/close-stderr.ll: Require the feature 'shell'. It is not executable on Win32 but it is executable on MSYS-bash.
...
llvm-svn: 121105
2010-12-07 02:43:58 +00:00
NAKAMURA Takumi
75986b8c07
test: Add the feature 'shell' on LLVM_ON_UNIX.
...
llvm-svn: 121104
2010-12-07 02:43:51 +00:00
NAKAMURA Takumi
547cc6f0a5
lib/Target/X86/X86MCAsmInfo.cpp: [PR8741] On Win64, specify explicit PrivateGlobalPrefix as ".L".
...
Or, global symbols @Lxxxx might be treated as temporal symbol by MCSymbol.
llvm-svn: 121103
2010-12-07 02:43:45 +00:00
Eric Christopher
f10dcfb9fb
Temporarily revert r121100 as it's causing clang to fail
...
CodeGenCXX/virtual-base-ctor.cpp.
llvm-svn: 121102
2010-12-07 02:41:11 +00:00
Eric Christopher
ba4f77262c
Two things: Fix testcase to use extern - otherwise the link will always
...
succeed. Also make the testcase clearer as to what we're doing and
emit a checking notification to the log.
llvm-svn: 121101
2010-12-07 02:05:42 +00:00
Chris Lattner
287f4366c1
fix PR8710 - teach global opt that some constantexprs are too complex to
...
put in a global variable's initializer.
llvm-svn: 121100
2010-12-07 01:59:32 +00:00
Jakob Stoklund Olesen
436dae5cf3
Remove unused member.
...
llvm-svn: 121098
2010-12-07 01:32:45 +00:00
Francois Pichet
7ce1c1eaa3
Promote "enumerator in switch of enum is not handled" to level 1 warning on MSVC. It was disabled by default.
...
llvm-svn: 121096
2010-12-07 01:25:06 +00:00
Michael J. Spencer
da817bf231
Test: Fix Support.Path and _all_ of the unittest death tests. GetTempPath defaults to \Windows\.
...
If I typed anything else it would just decline into cursing.
llvm-svn: 121095
2010-12-07 01:23:49 +00:00
Michael J. Spencer
f27da4e578
Support/Unix/PathV2: Return the real error from realpath instead of any error
...
that close or unlink set.
llvm-svn: 121094
2010-12-07 01:23:39 +00:00
Michael J. Spencer
e5755beb47
Support/Unix/PathV2: Use 0770 instead of 0700 when creating a directory. Also use
...
the standard macros instead of octal notation.
llvm-svn: 121093
2010-12-07 01:23:29 +00:00
Michael J. Spencer
98c7a114de
Support/PathV2: Use SmallVector::clear instead of set_size.
...
llvm-svn: 121092
2010-12-07 01:23:19 +00:00
Michael J. Spencer
5529c57cfe
Support/PathV2: Clarify and correct documentation.
...
llvm-svn: 121091
2010-12-07 01:23:08 +00:00
Michael J. Spencer
20daa28344
Support/PathV2: Move current_path from path to fs and fix the Unix implementation.
...
Unix bug spotted by Dan Gohman.
llvm-svn: 121090
2010-12-07 01:22:31 +00:00
Bob Wilson
654db47903
Add an OpReinterpret operation to TableGen's NeonEmitter.
...
An OpReinterpret entry is handled by translating it to OpCast intrinsics for
all combinations of source and destination types with the same total size.
This will be used to generate all the vreinterpret intrinsics.
llvm-svn: 121087
2010-12-07 01:12:23 +00:00
Bob Wilson
b87116e30a
Fix whitespace.
...
llvm-svn: 121086
2010-12-07 01:12:19 +00:00
Rafael Espindola
a2421ec705
Fix a crash reduced from gcc produced assembly.
...
llvm-svn: 121085
2010-12-07 01:09:54 +00:00
Owen Anderson
99ea8a3510
Second attempt at converting Thumb2's LDRpci, including updating the gazillion places that need to know about it.
...
llvm-svn: 121082
2010-12-07 00:45:21 +00:00
Devang Patel
52700c348b
Add python scripts to extract debug info using LLDB and do comparison.
...
llvm-svn: 121079
2010-12-07 00:34:59 +00:00
Devang Patel
786a05e6ad
Add a simple breakpoint location printer. This will be used by upcoming "debug info in optimized code" quality test harness to set breakpoints at "interesting" locations.
...
llvm-svn: 121078
2010-12-07 00:33:43 +00:00
Rafael Espindola
93e3cf0ebd
Sorry for such a large commit. The summary is that only MachO cares about the
...
actuall addresses in a .o file, so it is better to let the MachO writer compute
it.
This is good for two reasons. First, areas that shouldn't care about
addresses now don't have access to it. Second, the layout of each section
is independent. I should use this in a subsequent commit to speed it up.
Most of the patch is just removing the section address computation. The two
interesting parts are the change on how we handle padding in the end
of sections and how MachO can get the address of a-b when a and b are in
different sections.
Since now the expression evaluation normally doesn't know the section address,
it will think that a-b needs relocation and let the MachO writer know. Once
it has computed the section addresses, it calls back the expression evaluation
with the section addresses to resolve these expressions.
The remaining problem is the handling of padding. Currently it will create
a special alignment fragment at the end. Since that fragment doesn't update
the alignment of the section, it needs the real address to be computed.
Since now the layout will not compute a-b with a and b in different sections,
the only effect that the special alignment fragment has is update the
address size of the section. This can also be done by the MachO writer.
llvm-svn: 121076
2010-12-07 00:27:36 +00:00
Jim Grosbach
9e1994698d
Add fixup for Thumb1 BL/BLX instructions.
...
llvm-svn: 121072
2010-12-06 23:57:07 +00:00
Frits van Bommel
d9df6eaa9c
Implement jump threading of 'indirectbr' by keeping track of whether we're looking for ConstantInt*s or BlockAddress*s.
...
llvm-svn: 121066
2010-12-06 23:36:56 +00:00
Devang Patel
bca5b25721
Undefined value in reg 0 may need a marker to identify end of source range.
...
This will be used to truncate live range of DBG_VALUE instruction by register allocator and friends.
llvm-svn: 121061
2010-12-06 22:48:22 +00:00
Devang Patel
c24048a718
If dbg_declare() or dbg_value() is not lowered by isel then emit DEBUG message instead of creating DBG_VALUE for undefined value in reg0.
...
llvm-svn: 121059
2010-12-06 22:39:26 +00:00
Rafael Espindola
1055f72b97
Use references to simplify the code a bit.
...
llvm-svn: 121050
2010-12-06 22:30:54 +00:00
Wesley Peck
dba03b050f
Adding bug fix that was suppose to be part of 121044.
...
patch contributed by Jack Whitham!
llvm-svn: 121049
2010-12-06 22:19:28 +00:00
Wesley Peck
8da34b6c35
Fixed reversed operands for IDIV and CMP instructions in MBlaze backend.
...
Use BRAD instead of BRD for indirect branches in MBlaze backend.
patch contributed by Jack Whitham!
llvm-svn: 121044
2010-12-06 22:06:49 +00:00
Jason W Kim
495c2bb9a6
Refactor ELFObjectWriter.
...
+ ARM/X86/MBlaze now share a common RecordRelocation
+ ARM/X86/MBlaze arch specific routines are limited to GetRelocType()
llvm-svn: 121043
2010-12-06 21:57:34 +00:00
Chris Lattner
7ff0ba41bd
replace a linear scan with a symtab lookup, reduce indentation.
...
No functionality change.
llvm-svn: 121042
2010-12-06 21:53:07 +00:00
Rafael Espindola
e134b08daa
use getSymbolOffset.
...
llvm-svn: 121041
2010-12-06 21:51:55 +00:00
Chris Lattner
4dc53e37d9
Use a stronger predicate here, pointed out by Duncan
...
llvm-svn: 121040
2010-12-06 21:48:10 +00:00
Chris Lattner
ca335e38cf
add some DEBUG statements.
...
llvm-svn: 121038
2010-12-06 21:13:51 +00:00
Wesley Peck
6ce9b60811
Fix a 16-bit immediate value detection bug in the MBlaze delay slot filler.
...
Address more hazards in the MBlaze delay slot filler.
patch contributed by Jack Whitham!
llvm-svn: 121037
2010-12-06 21:11:01 +00:00
Rafael Espindola
408344017e
Another use of getSymbolOffset.
...
llvm-svn: 121034
2010-12-06 19:55:05 +00:00
Rafael Espindola
0f30fec0bd
Remove the instruction fragment to data fragment lowering since it was causing
...
freed data to be read. I will open a bug to track it being reenabled.
llvm-svn: 121028
2010-12-06 19:08:48 +00:00
Owen Anderson
c1ee8e35d2
Revert r121021, which broke the buildbots.
...
llvm-svn: 121026
2010-12-06 18:57:40 +00:00
Jim Grosbach
67f13b19b5
Trailing whitespace.
...
llvm-svn: 121024
2010-12-06 18:47:44 +00:00
Owen Anderson
bb4a76fc95
Improve handling of Thumb2 PC-relative loads by converting LDRpci (and friends) to Pseudos.
...
llvm-svn: 121021
2010-12-06 18:35:51 +00:00
Jim Grosbach
968c927201
Encode the register operand of ARM CondCode operands correctly. ARM::CPSR if
...
the instruction is predicated, reg0 otherwise.
llvm-svn: 121020
2010-12-06 18:30:57 +00:00
Jim Grosbach
0bfb4d5043
The ARM AsmMatcher needs to know that the CCOut operand is a register value,
...
not an immediate. It stores either ARM::CPSR or reg0.
llvm-svn: 121018
2010-12-06 18:21:12 +00:00
Devang Patel
2379f3abd5
Do not try luck by using given name to create temporary file. In parallel builds it may not work.
...
This time for .s file.
llvm-svn: 121016
2010-12-06 18:04:39 +00:00
Rafael Espindola
44bbe36de6
Second try at making direct object emission produce the same results
...
as llc + llvm-mc. This time ELF is not changed and I tested that llvm-gcc
bootstrap on darwin10 using darwin9's assembler and linker.
llvm-svn: 121006
2010-12-06 17:27:56 +00:00
Rafael Espindola
dee3062373
Revert previous two patches while I try to find out how to make both
...
linux and darwin assemblers happy :-(
llvm-svn: 121004
2010-12-06 15:35:15 +00:00
Rafael Espindola
884d58a798
Update test for the extra =.
...
llvm-svn: 121001
2010-12-06 15:05:36 +00:00
Rafael Espindola
34a06a0802
Add an EmitAbsValue helper method and use it in cases where we want to be sure
...
that no relocations are used (on MochO).
Fixes llc producing different output from llc + llvm-mc.
llvm-svn: 121000
2010-12-06 14:53:14 +00:00
Frits van Bommel
aa0060085d
Fix clang warning: "extra ';' inside a class [-pedantic]".
...
llvm-svn: 120998
2010-12-06 10:48:11 +00:00
Chris Lattner
fb212de06d
Fix PR8735, a really terrible problem in the inliner's "alloca merging"
...
optimization.
Consider:
static void foo() {
A = alloca
...
}
static void bar() {
B = alloca
...
call foo();
}
void main() {
bar()
}
The inliner proceeds bottom up, but lets pretend it decides not to inline foo
into bar. When it gets to main, it inlines bar into main(), and says "hey, I
just inlined an alloca "B" into main, lets remember that. Then it keeps going
and finds that it now contains a call to foo. It decides to inline foo into
main, and says "hey, foo has an alloca A, and I have an alloca B from another
inlined call site, lets reuse it". The problem with this of course, is that
the lifetime of A and B are nested, not disjoint.
Unfortunately I can't create a reasonable testcase for this: the one in the
PR is both huge and extremely sensitive, because you minor tweaks end up
causing foo to get inlined into bar too early. We already have tests for the
basic alloca merging optimization and this does not break them.
llvm-svn: 120995
2010-12-06 07:52:42 +00:00
Chris Lattner
cd3af96a8f
improve comment
...
llvm-svn: 120994
2010-12-06 07:43:04 +00:00
Chris Lattner
5b6a865f2e
improve -debug output and comments a little.
...
llvm-svn: 120993
2010-12-06 07:38:40 +00:00
Michael J. Spencer
0d025b6b42
Support/Windows: Make MinGW happy.
...
llvm-svn: 120991
2010-12-06 06:02:07 +00:00
Michael J. Spencer
7ecd94cc0b
Support/FileSystem: Add directory_iterator implementation.
...
llvm-svn: 120989
2010-12-06 04:28:42 +00:00
Michael J. Spencer
95e4ac16a5
Support/PathV2: Fix append to not add a slash to empty or root paths.
...
llvm-svn: 120988
2010-12-06 04:28:23 +00:00
Michael J. Spencer
39c4621f42
Support/Windows: Add ScopedHandle and move some clients over to it.
...
llvm-svn: 120987
2010-12-06 04:28:13 +00:00
Michael J. Spencer
459a6f150a
KillTheDoctor: Cleanup error_code usage.
...
llvm-svn: 120986
2010-12-06 04:28:01 +00:00
Michael J. Spencer
1e4f03ce9f
KillTheDoctor: Fix spelling.
...
llvm-svn: 120985
2010-12-06 04:27:52 +00:00
Michael J. Spencer
911742c4b7
Support/ADT: Move c_str() from SmallString to SmallVectorImpl. The Windows PathV2
...
implementation needs it for wchar_t and SmallVectorImpl in general.
llvm-svn: 120984
2010-12-06 04:27:42 +00:00
Che-Liang Chiou
9f2af628a6
ptx: add shift instructions
...
llvm-svn: 120982
2010-12-06 04:00:03 +00:00
Rafael Espindola
baf2f3b3eb
Remove the getAddress getter, initialize Ordinal in the constructor and use
...
that on the ELF writer to detect a section we created.
llvm-svn: 120981
2010-12-06 03:48:09 +00:00
Rafael Espindola
46e40188f7
Simplify a bit.
...
llvm-svn: 120980
2010-12-06 03:36:43 +00:00
Rafael Espindola
45790b82af
Use getSymbolOffset on the COFF writer.
...
llvm-svn: 120979
2010-12-06 03:24:04 +00:00
Rafael Espindola
ac60adb38d
Don't use PadSectionToAlignment on windows.
...
llvm-svn: 120978
2010-12-06 03:03:44 +00:00
Rafael Espindola
e7284c3671
Add a getSymbolOffset method and use it in the ELF writer.
...
llvm-svn: 120977
2010-12-06 02:57:26 +00:00
Chris Lattner
94fbdf3814
Fix PR8728, a miscompilation I recently introduced. When optimizing
...
memcpy's like:
memcpy(A, B)
memcpy(A, C)
we cannot delete the first memcpy as dead if A and C might be aliases.
If so, we actually get:
memcpy(A, B)
memcpy(A, A)
which is not correct to transform into:
memcpy(A, A)
This patch was heavily influenced by Jakub Staszak's patch in PR8728, thanks
Jakub!
llvm-svn: 120974
2010-12-06 01:48:06 +00:00
Chris Lattner
fa64f120ad
add a helper method.
...
llvm-svn: 120973
2010-12-06 01:01:28 +00:00
Evan Cheng
abd6d2742a
Eliminate unneeded #include's.
...
llvm-svn: 120971
2010-12-05 23:41:43 +00:00
NAKAMURA Takumi
70fbbf534b
ARM/CMakeLists.txt: Add missing MLxExpansionPass.cpp since r120960.
...
llvm-svn: 120966
2010-12-05 23:08:57 +00:00
Evan Cheng
12f4d615ab
Code clean up.
...
llvm-svn: 120965
2010-12-05 23:03:45 +00:00
Evan Cheng
b8a662f0d1
Remove an unused variable.
...
llvm-svn: 120964
2010-12-05 23:03:35 +00:00
Cameron Zwarich
c7223a3e37
Some cleanup before I start committing some incremental progress on
...
StrongPHIElimination.
llvm-svn: 120961
2010-12-05 22:34:08 +00:00
Evan Cheng
62c7b5bf76
Making use of VFP / NEON floating point multiply-accumulate / subtraction is
...
difficult on current ARM implementations for a few reasons.
1. Even though a single vmla has latency that is one cycle shorter than a pair
of vmul + vadd, a RAW hazard during the first (4? on Cortex-a8) can cause
additional pipeline stall. So it's frequently better to single codegen
vmul + vadd.
2. A vmla folowed by a vmul, vmadd, or vsub causes the second fp instruction to
stall for 4 cycles. We need to schedule them apart.
3. A vmla followed vmla is a special case. Obvious issuing back to back RAW
vmla + vmla is very bad. But this isn't ideal either:
vmul
vadd
vmla
Instead, we want to expand the second vmla:
vmla
vmul
vadd
Even with the 4 cycle vmul stall, the second sequence is still 2 cycles
faster.
Up to now, isel simply avoid codegen'ing fp vmla / vmls. This works well enough
but it isn't the optimial solution. This patch attempts to make it possible to
use vmla / vmls in cases where it is profitable.
A. Add missing isel predicates which cause vmla to be codegen'ed.
B. Make sure the fmul in (fadd (fmul)) has a single use. We don't want to
compute a fmul and a fmla.
C. Add additional isel checks for vmla, avoid cases where vmla is feeding into
fp instructions (except for the #3 exceptional case).
D. Add ARM hazard recognizer to model the vmla / vmls hazards.
E. Add a special pre-regalloc case to expand vmla / vmls when it's likely the
vmla / vmls will trigger one of the special hazards.
Work in progress, only A+B are enabled.
llvm-svn: 120960
2010-12-05 22:04:16 +00:00
Cameron Zwarich
a3fb8cb3d4
Remove the PHIElimination.h header, as it is no longer needed.
...
llvm-svn: 120959
2010-12-05 21:39:42 +00:00
Frits van Bommel
7cf63ace18
Clarify some of the differences between indexing with getelementptr and indexing with insertvalue/extractvalue.
...
llvm-svn: 120957
2010-12-05 20:54:38 +00:00
Frits van Bommel
16ebe77be0
Fix PR 4170 by having ExtractValueInst::getIndexedType() reject out-of-bounds indexing.
...
Also add asserts that the indices are valid in InsertValueInst::init(). ExtractValueInst already asserts when constructed with invalid indices.
llvm-svn: 120956
2010-12-05 20:50:26 +00:00
Cameron Zwarich
6766c420a2
I forgot to actually remove the FindCopyInsertPoint() declaration from
...
PHIElimination.h.
llvm-svn: 120953
2010-12-05 19:58:57 +00:00
Cameron Zwarich
8d1695589c
Remove the SplitCriticalEdge() method declaration from PHIElimination.h. At one
...
time, this method existed, but now PHIElimination uses the method of the same
name on MachineBasicBlock.
llvm-svn: 120952
2010-12-05 19:54:23 +00:00
Cameron Zwarich
da592a9e41
Move the FindCopyInsertPoint method of PHIElimination to a new standalone
...
function so that it can be shared with StrongPHIElimination.
llvm-svn: 120951
2010-12-05 19:51:05 +00:00
Frits van Bommel
76244867cf
Refactor jump threading.
...
Should have no functional change other than the order of two transformations that are mutually-exclusive and the exact formatting of debug output.
Internally, it now stores the ConstantInt*s as Constant*s, and actual undef values instead of nulls.
llvm-svn: 120946
2010-12-05 19:06:41 +00:00
Frits van Bommel
5e75ef4a8e
Remove trailing whitespace.
...
llvm-svn: 120945
2010-12-05 19:02:47 +00:00
Frits van Bommel
8fb69ee805
Teach SimplifyCFG to turn
...
(indirectbr (select cond, blockaddress(@fn, BlockA),
blockaddress(@fn, BlockB)))
into
(br cond, BlockA, BlockB).
llvm-svn: 120943
2010-12-05 18:29:03 +00:00
Chris Lattner
6886171792
Teach X86ISelLowering that the second result of X86ISD::UMUL is a flags
...
result. This allows us to compile:
void *test12(long count) {
return new int[count];
}
into:
test12:
movl $4, %ecx
movq %rdi, %rax
mulq %rcx
movq $-1, %rdi
cmovnoq %rax, %rdi
jmp __Znam ## TAILCALL
instead of:
test12:
movl $4, %ecx
movq %rdi, %rax
mulq %rcx
seto %cl
testb %cl, %cl
movq $-1, %rdi
cmoveq %rax, %rdi
jmp __Znam
Of course it would be even better if the regalloc inverted the cmov to 'cmovoq',
which would eliminate the need for the 'movq %rdi, %rax'.
llvm-svn: 120936
2010-12-05 07:49:54 +00:00
Chris Lattner
364bb0a081
it turns out that when ".with.overflow" intrinsics were added to the X86
...
backend that they were all implemented except umul. This one fell back
to the default implementation that did a hi/lo multiply and compared the
top. Fix this to check the overflow flag that the 'mul' instruction
sets, so we can avoid an explicit test. Now we compile:
void *func(long count) {
return new int[count];
}
into:
__Z4funcl: ## @_Z4funcl
movl $4, %ecx ## encoding: [0xb9,0x04,0x00,0x00,0x00]
movq %rdi, %rax ## encoding: [0x48,0x89,0xf8]
mulq %rcx ## encoding: [0x48,0xf7,0xe1]
seto %cl ## encoding: [0x0f,0x90,0xc1]
testb %cl, %cl ## encoding: [0x84,0xc9]
movq $-1, %rdi ## encoding: [0x48,0xc7,0xc7,0xff,0xff,0xff,0xff]
cmoveq %rax, %rdi ## encoding: [0x48,0x0f,0x44,0xf8]
jmp __Znam ## TAILCALL
instead of:
__Z4funcl: ## @_Z4funcl
movl $4, %ecx ## encoding: [0xb9,0x04,0x00,0x00,0x00]
movq %rdi, %rax ## encoding: [0x48,0x89,0xf8]
mulq %rcx ## encoding: [0x48,0xf7,0xe1]
testq %rdx, %rdx ## encoding: [0x48,0x85,0xd2]
movq $-1, %rdi ## encoding: [0x48,0xc7,0xc7,0xff,0xff,0xff,0xff]
cmoveq %rax, %rdi ## encoding: [0x48,0x0f,0x44,0xf8]
jmp __Znam ## TAILCALL
Other than the silly seto+test, this is using the o bit directly, so it's going in the right
direction.
llvm-svn: 120935
2010-12-05 07:30:36 +00:00
Chris Lattner
183ddd8ed3
fix the rest of the linux miscompares :)
...
llvm-svn: 120933
2010-12-05 02:08:07 +00:00
Chris Lattner
116580a11c
generalize the previous check to handle -1 on either side of the
...
select, inserting a not to compensate. Add a missing isZero check
that I lost somehow.
This improves codegen of:
void *func(long count) {
return new int[count];
}
from:
__Z4funcl: ## @_Z4funcl
movl $4, %ecx ## encoding: [0xb9,0x04,0x00,0x00,0x00]
movq %rdi, %rax ## encoding: [0x48,0x89,0xf8]
mulq %rcx ## encoding: [0x48,0xf7,0xe1]
testq %rdx, %rdx ## encoding: [0x48,0x85,0xd2]
movq $-1, %rdi ## encoding: [0x48,0xc7,0xc7,0xff,0xff,0xff,0xff]
cmoveq %rax, %rdi ## encoding: [0x48,0x0f,0x44,0xf8]
jmp __Znam ## TAILCALL
## encoding: [0xeb,A]
to:
__Z4funcl: ## @_Z4funcl
movl $4, %ecx ## encoding: [0xb9,0x04,0x00,0x00,0x00]
movq %rdi, %rax ## encoding: [0x48,0x89,0xf8]
mulq %rcx ## encoding: [0x48,0xf7,0xe1]
cmpq $1, %rdx ## encoding: [0x48,0x83,0xfa,0x01]
sbbq %rdi, %rdi ## encoding: [0x48,0x19,0xff]
notq %rdi ## encoding: [0x48,0xf7,0xd7]
orq %rax, %rdi ## encoding: [0x48,0x09,0xc7]
jmp __Znam ## TAILCALL
## encoding: [0xeb,A]
llvm-svn: 120932
2010-12-05 02:00:51 +00:00
Chris Lattner
77a11c6174
relax this to handle linux defaulting to -static.
...
llvm-svn: 120930
2010-12-05 01:31:13 +00:00
Chris Lattner
342e6ea5f9
Improve an integer select optimization in two ways:
...
1. generalize
(select (x == 0), -1, 0) -> (sign_bit (x - 1))
to:
(select (x == 0), -1, y) -> (sign_bit (x - 1)) | y
2. Handle the identical pattern that happens with !=:
(select (x != 0), y, -1) -> (sign_bit (x - 1)) | y
cmov is often high latency and can't fold immediates or
memory operands. For example for (x == 0) ? -1 : 1, before
we got:
< testb %sil, %sil
< movl $-1, %ecx
< movl $1, %eax
< cmovel %ecx, %eax
now we get:
> cmpb $1, %sil
> sbbl %eax, %eax
> orl $1, %eax
llvm-svn: 120929
2010-12-05 01:23:24 +00:00
Chris Lattner
0523388d60
merge some tests into select.ll and make them more specific.
...
llvm-svn: 120928
2010-12-05 01:13:58 +00:00
Chris Lattner
b89b6f17da
rename test
...
llvm-svn: 120927
2010-12-05 01:02:23 +00:00
Chris Lattner
d4f8c9641a
remove two tests that aren't really testing anything.
...
llvm-svn: 120926
2010-12-05 01:02:13 +00:00
Bill Wendling
2bce78e8fc
Initialize HasPOPCNT.
...
llvm-svn: 120923
2010-12-04 23:57:24 +00:00
Rafael Espindola
8867390cf2
Once the layout is done we don't need to keep updating which fragments are
...
valid. Addresses will not change.
llvm-svn: 120921
2010-12-04 22:47:22 +00:00
Rafael Espindola
99e026dbca
Remember the contents of leb and dwarfline fragments when relaxing. This avoids
...
having to evaluate the expression again when writing.
llvm-svn: 120920
2010-12-04 21:58:52 +00:00
Cameron Zwarich
fbd47dcc55
Remove PHIElimination's private copy of SkipPHIsAndLabels.
...
llvm-svn: 120918
2010-12-04 20:40:15 +00:00
Benjamin Kramer
2f489236ab
Add patterns for the x86 popcnt instruction.
...
- Also adds a new POPCNT subtarget feature that is currently enabled if the target
supports SSE4.2 (nehalem) or SSE4A (barcelona).
llvm-svn: 120917
2010-12-04 20:32:23 +00:00
Bill Wendling
3336f748a5
Silence 'may be used uninitialized in this function' warnings. Static analysis
...
may determine that they cannot be used uninitialized. But that might be a bit
too much for the compiler to determine.
llvm-svn: 120916
2010-12-04 20:20:34 +00:00
Michael J. Spencer
66a1f86f7a
Support/PathV2: Remove redundant calls to make_error_code.
...
llvm-svn: 120913
2010-12-04 18:45:32 +00:00
Benjamin Kramer
f1a04edb42
APInt: microoptimize a few methods.
...
llvm-svn: 120912
2010-12-04 18:05:36 +00:00
Benjamin Kramer
5d75f0bddd
Simplify APInt::getAllOnesValue.
...
llvm-svn: 120911
2010-12-04 16:37:47 +00:00
Benjamin Kramer
31920b0a2a
Remove unneeded zero arrays.
...
llvm-svn: 120910
2010-12-04 15:28:22 +00:00
Benjamin Kramer
6f88fcb16b
Apparently APFloat::getZero doesn't like PPCDoubleDoubles.
...
llvm-svn: 120909
2010-12-04 14:43:08 +00:00
Francois Pichet
82f3b5f945
Disable C++ exception handling on MSVC.
...
Total size of bin\Release on disk goes from 82.9 MB to 74.2 MB. (~10% saving)
llvm-svn: 120908
2010-12-04 14:30:22 +00:00
Benjamin Kramer
8ceebfaa04
Simplify code. No functionality change.
...
llvm-svn: 120907
2010-12-04 14:22:24 +00:00
Francois Pichet
916fae2a34
Disable RTTI on Windows.
...
Total size of bin\Release on disk goes from 83.6 MB to 81.8MB. (~2% saving)
llvm-svn: 120901
2010-12-04 09:42:30 +00:00
Bob Wilson
ed854baad5
The Thumb tADDrSPi instruction is not valid when the destination is SP.
...
Check for that and try narrowing it to tADDspi instead. Radar 8724703.
llvm-svn: 120892
2010-12-04 04:40:19 +00:00
Bob Wilson
236ba8d862
Remove trailing whitespace.
...
llvm-svn: 120891
2010-12-04 04:40:15 +00:00
Rafael Espindola
1c8ac8f027
There are two reasons why we might want to use
...
foo = a - b
.long foo
instead of just
.long a - b
First, on darwin9 64 bits the assembler produces the wrong result. Second,
if "a" is the end of the section all darwin assemblers (9, 10 and mc) will not
consider a - b to be a constant but will if the dummy foo is created.
Split how we handle these cases. The first one is something MC should take care
of. The second one has to be handled by the caller.
llvm-svn: 120889
2010-12-04 03:21:47 +00:00
Michael J. Spencer
4fb115d2f3
Unittests/Support/PathV2: Add FileSystem tests.
...
llvm-svn: 120888
2010-12-04 03:18:42 +00:00
Michael J. Spencer
db5576a185
Support/FileSystem: Add status implementation.
...
llvm-svn: 120870
2010-12-04 00:32:40 +00:00
Michael J. Spencer
32a15547da
Support/SystemError: Make error_category and error_code auto-bool-conversion-safe.
...
llvm-svn: 120869
2010-12-04 00:32:24 +00:00
Michael J. Spencer
962fbc42b5
Support/Windows/FileSystem: Fix MinGW warnings.
...
llvm-svn: 120868
2010-12-04 00:32:14 +00:00
Michael J. Spencer
818ab4aad4
Support/FileSystem: Add file_size implementation.
...
llvm-svn: 120867
2010-12-04 00:31:48 +00:00
Rafael Espindola
1048e75fb9
Next step: Only pad debug_line when the target is darwin. Add a FIXME to avoid
...
doing that if the target is darwin10 or newer.
This fixes
*) Direct object emission was producing objects without the workaround on
darwin9.
*) Assembly printing was producing objects with the workaround on linux.
llvm-svn: 120866
2010-12-04 00:31:13 +00:00
Jim Grosbach
ce18d7ebb5
Encode condition code for Thumb1 conditional branch instruction.
...
llvm-svn: 120865
2010-12-04 00:20:40 +00:00
Devang Patel
6b5d5b5c3b
Do not try luck by using given name to create temporary file. In parallel builds it may not work.
...
llvm-svn: 120860
2010-12-03 23:58:31 +00:00
Jim Grosbach
5bae054f07
Correctly size-reduce the t2CMPzrr instruction to tCMPzr when possible.
...
tCMPzhir has undefined behavior when both source registers are low registers.
rdar://8728577
llvm-svn: 120858
2010-12-03 23:54:18 +00:00
Bill Wendling
127d7485f1
Use correct variable names to match the patterns.
...
llvm-svn: 120857
2010-12-03 23:44:24 +00:00
Jakob Stoklund Olesen
8bdfb0c166
Also inore '()' while creating mdnode name from ObjC symbol name.
...
llvm-svn: 120856
2010-12-03 23:40:45 +00:00
Rafael Espindola
f8af778e1f
First step in fixing MC. Make it clear that we are avoiding a bug in the
...
darwin9 linker, what is needed to avoid it and where to get more information.
Also make the workaround simpler. Just the regular end_sequence we normally
create is more than 4 bytes.
Tested by building cctools and ld64 from darwin9 on a darwin10 system and using
those. I checked that I was able to reproduce the bootstrap failure when
the the workaround was disabled.
llvm-svn: 120854
2010-12-03 23:36:59 +00:00
Devang Patel
f0227ccf3f
Ignore '+' while creating mdnode name from ObjC symbol name.
...
llvm-svn: 120853
2010-12-03 23:29:30 +00:00
Jim Grosbach
a09cbbeef5
Match pattern operand names to expected encoding field names. This corrects the
...
operand encoding ordering of the instruction.
llvm-svn: 120852
2010-12-03 23:21:25 +00:00
Jim Grosbach
e4fee20498
Remove incorrect BL target encoding (it's similar to, but not the same as the
...
ARM instruction). Add encoding of bits 13 and 11.
llvm-svn: 120849
2010-12-03 22:33:42 +00:00
Jim Grosbach
567ebd0cb5
Encode the 32-bit wide Thumb (and Thumb2) instructions with the high order
...
halfword being emitted to the stream first. rdar://8728174
llvm-svn: 120848
2010-12-03 22:31:40 +00:00
Nate Begeman
a6c55a3195
Revert this change since it breaks a couple of the AVX tests.
...
I'm unclear if the tests are actually correct or not, but reverting for now.
llvm-svn: 120847
2010-12-03 22:29:15 +00:00
Jakob Stoklund Olesen
922e1fac6c
Rename virtRegMap to avoid confusion with the VirtRegMap that it isn't.
...
llvm-svn: 120846
2010-12-03 22:25:09 +00:00
Jakob Stoklund Olesen
4408603a9e
Coalesce debug locations when possible, causing less DBG_VALUE instructions to
...
be emitted.
llvm-svn: 120845
2010-12-03 22:25:07 +00:00
Nate Begeman
a3b00dd64f
Scalar f32/f64 are also subregs of ymm regs
...
llvm-svn: 120844
2010-12-03 21:54:39 +00:00