Bill Wendling [Tue, 7 Dec 2010 23:05:20 +0000 (23:05 +0000)]
A bit of cleanup: early exit ApplyFixup and cache the Fixup offset. No
functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121195
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 7 Dec 2010 22:39:24 +0000 (22:39 +0000)]
Add an operator for vdup_lane so it can be implemented without a clang builtin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121190
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 7 Dec 2010 22:02:48 +0000 (22:02 +0000)]
Add an operator for vmull_lane so it can be implemented without a clang builtin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121187
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 7 Dec 2010 21:50:47 +0000 (21:50 +0000)]
Binary encoding for ARM tLDRspi and tSTRspi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121186
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 7 Dec 2010 21:12:05 +0000 (21:12 +0000)]
Handle recursive values. Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121184
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 7 Dec 2010 20:50:15 +0000 (20:50 +0000)]
Fix Thumb2 encoding of the S bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121182
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 7 Dec 2010 20:44:33 +0000 (20:44 +0000)]
Remove reference to the CMPz instruction patterns for ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121180
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 7 Dec 2010 20:41:06 +0000 (20:41 +0000)]
Refactor the ARM CMPz* patterns to just use the normal CMP instructions when
possible. They were duplicates for everything exception the source pattern
before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121179
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 7 Dec 2010 20:11:46 +0000 (20:11 +0000)]
Code clean up; no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121176
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 7 Dec 2010 20:02:45 +0000 (20:02 +0000)]
Add new built-in operations for vmull and vmull_n
so they can be implemented without requiring clang builtins.
Radar
8446238.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121173
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 7 Dec 2010 19:59:34 +0000 (19:59 +0000)]
Code clean up; no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121172
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 7 Dec 2010 19:56:51 +0000 (19:56 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121170
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 7 Dec 2010 19:36:07 +0000 (19:36 +0000)]
Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121167
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 7 Dec 2010 19:35:36 +0000 (19:35 +0000)]
Change assert to diagnostic. Message still needs work, but it's better than
an assert, at least.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121166
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 7 Dec 2010 19:04:14 +0000 (19:04 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121164
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 7 Dec 2010 19:00:20 +0000 (19:00 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121163
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 7 Dec 2010 18:51:27 +0000 (18:51 +0000)]
Simplify assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121162
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 7 Dec 2010 18:50:33 +0000 (18:50 +0000)]
Missed a spot removing Alarm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121161
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 7 Dec 2010 18:41:59 +0000 (18:41 +0000)]
Support: Remove Alarm. It is unused (via local grep and google code search).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121160
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 7 Dec 2010 18:12:07 +0000 (18:12 +0000)]
Support/PathV2: Remove const from bool return types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121157
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 7 Dec 2010 18:11:54 +0000 (18:11 +0000)]
Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121156
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 7 Dec 2010 18:11:38 +0000 (18:11 +0000)]
Support: Remove DynamicLinker.h. It is unused and unimplemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121155
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 7 Dec 2010 17:48:24 +0000 (17:48 +0000)]
Encode the literal field for tCMPzi instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121153
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 7 Dec 2010 17:12:32 +0000 (17:12 +0000)]
Fix absolute recording of differences of symbols in two sections. Reduced from ctor_dtor_count-2.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121152
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 7 Dec 2010 17:04:04 +0000 (17:04 +0000)]
Support/PathV2: Change most functions in the path namespace to return their work
via their return value instead of an out parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121149
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Dec 2010 16:29:44 +0000 (16:29 +0000)]
build: Go back to dropping __eprintf reference when building with Clang, see
comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121146
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 7 Dec 2010 15:50:35 +0000 (15:50 +0000)]
Add parens to pacify gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121142
91177308-0d34-0410-b5e6-
96231b3b80d8
Frits van Bommel [Tue, 7 Dec 2010 13:08:07 +0000 (13:08 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121133
91177308-0d34-0410-b5e6-
96231b3b80d8
Frits van Bommel [Tue, 7 Dec 2010 10:22:07 +0000 (10:22 +0000)]
CMake: Fix warning in gtest header used by unit tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121127
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Tue, 7 Dec 2010 08:25:19 +0000 (08:25 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121120
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 7 Dec 2010 07:56:20 +0000 (07:56 +0000)]
Don't leak the mutex when loading dynamic libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121119
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 7 Dec 2010 07:41:32 +0000 (07:41 +0000)]
utils/lit/lit/TestFormats.py: [PR8438] unittests: Seek *Tests (not BUILD_MODE/*Tests) under whole unittests/ if BUILD_MODE == '.'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121118
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 7 Dec 2010 07:41:23 +0000 (07:41 +0000)]
unittests/CMakeLists.txt: Tweak unittests' layout to be identical to GNU build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121117
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 7 Dec 2010 05:57:28 +0000 (05:57 +0000)]
Fix relocations with weak definitions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121114
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 7 Dec 2010 05:57:02 +0000 (05:57 +0000)]
Revert test/Archive/check_binary_output.ll". It fails on a buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121113
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 7 Dec 2010 04:33:29 +0000 (04:33 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121111
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 7 Dec 2010 03:57:48 +0000 (03:57 +0000)]
Support/PathV2: Cleanup separator handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121110
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 7 Dec 2010 03:57:37 +0000 (03:57 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121109
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 7 Dec 2010 03:57:17 +0000 (03:57 +0000)]
Support/PathV2: Move make_absolute from path to fs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121108
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 7 Dec 2010 03:50:14 +0000 (03:50 +0000)]
Fix pcrel relocations that cross sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121107
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 7 Dec 2010 03:35:20 +0000 (03:35 +0000)]
test/Archive/check_binary_output.ll: Add a new test to check output of 'llvm-ar -p' is sane. Thanks to Danil Malyshev!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121106
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 7 Dec 2010 02:43:58 +0000 (02:43 +0000)]
test/Other/close-stderr.ll: Require the feature 'shell'. It is not executable on Win32 but it is executable on MSYS-bash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121105
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 7 Dec 2010 02:43:51 +0000 (02:43 +0000)]
test: Add the feature 'shell' on LLVM_ON_UNIX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121104
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 7 Dec 2010 02:43:45 +0000 (02:43 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121103
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 7 Dec 2010 02:41:11 +0000 (02:41 +0000)]
Temporarily revert r121100 as it's causing clang to fail
CodeGenCXX/virtual-base-ctor.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121102
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 7 Dec 2010 02:05:42 +0000 (02:05 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121101
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 7 Dec 2010 01:59:32 +0000 (01:59 +0000)]
fix PR8710 - teach global opt that some constantexprs are too complex to
put in a global variable's initializer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121100
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 7 Dec 2010 01:32:45 +0000 (01:32 +0000)]
Remove unused member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121098
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Tue, 7 Dec 2010 01:25:06 +0000 (01:25 +0000)]
Promote "enumerator in switch of enum is not handled" to level 1 warning on MSVC. It was disabled by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121096
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 7 Dec 2010 01:23:49 +0000 (01:23 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121095
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 7 Dec 2010 01:23:39 +0000 (01:23 +0000)]
Support/Unix/PathV2: Return the real error from realpath instead of any error
that close or unlink set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121094
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 7 Dec 2010 01:23:29 +0000 (01:23 +0000)]
Support/Unix/PathV2: Use 0770 instead of 0700 when creating a directory. Also use
the standard macros instead of octal notation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121093
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 7 Dec 2010 01:23:19 +0000 (01:23 +0000)]
Support/PathV2: Use SmallVector::clear instead of set_size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121092
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 7 Dec 2010 01:23:08 +0000 (01:23 +0000)]
Support/PathV2: Clarify and correct documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121091
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 7 Dec 2010 01:22:31 +0000 (01:22 +0000)]
Support/PathV2: Move current_path from path to fs and fix the Unix implementation.
Unix bug spotted by Dan Gohman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121090
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 7 Dec 2010 01:12:23 +0000 (01:12 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121087
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 7 Dec 2010 01:12:19 +0000 (01:12 +0000)]
Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121086
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 7 Dec 2010 01:09:54 +0000 (01:09 +0000)]
Fix a crash reduced from gcc produced assembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121085
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 7 Dec 2010 00:45:21 +0000 (00:45 +0000)]
Second attempt at converting Thumb2's LDRpci, including updating the gazillion places that need to know about it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121082
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 7 Dec 2010 00:34:59 +0000 (00:34 +0000)]
Add python scripts to extract debug info using LLDB and do comparison.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121079
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 7 Dec 2010 00:33:43 +0000 (00:33 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121078
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 7 Dec 2010 00:27:36 +0000 (00:27 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121076
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 6 Dec 2010 23:57:07 +0000 (23:57 +0000)]
Add fixup for Thumb1 BL/BLX instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121072
91177308-0d34-0410-b5e6-
96231b3b80d8
Frits van Bommel [Mon, 6 Dec 2010 23:36:56 +0000 (23:36 +0000)]
Implement jump threading of 'indirectbr' by keeping track of whether we're looking for ConstantInt*s or BlockAddress*s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121066
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 6 Dec 2010 22:48:22 +0000 (22:48 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121061
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 6 Dec 2010 22:39:26 +0000 (22:39 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121059
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 6 Dec 2010 22:30:54 +0000 (22:30 +0000)]
Use references to simplify the code a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121050
91177308-0d34-0410-b5e6-
96231b3b80d8
Wesley Peck [Mon, 6 Dec 2010 22:19:28 +0000 (22:19 +0000)]
Adding bug fix that was suppose to be part of 121044.
patch contributed by Jack Whitham!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121049
91177308-0d34-0410-b5e6-
96231b3b80d8
Wesley Peck [Mon, 6 Dec 2010 22:06:49 +0000 (22:06 +0000)]
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!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121044
91177308-0d34-0410-b5e6-
96231b3b80d8
Jason W Kim [Mon, 6 Dec 2010 21:57:34 +0000 (21:57 +0000)]
Refactor ELFObjectWriter.
+ ARM/X86/MBlaze now share a common RecordRelocation
+ ARM/X86/MBlaze arch specific routines are limited to GetRelocType()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121043
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 6 Dec 2010 21:53:07 +0000 (21:53 +0000)]
replace a linear scan with a symtab lookup, reduce indentation.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121042
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 6 Dec 2010 21:51:55 +0000 (21:51 +0000)]
use getSymbolOffset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121041
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 6 Dec 2010 21:48:10 +0000 (21:48 +0000)]
Use a stronger predicate here, pointed out by Duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121040
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 6 Dec 2010 21:13:51 +0000 (21:13 +0000)]
add some DEBUG statements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121038
91177308-0d34-0410-b5e6-
96231b3b80d8
Wesley Peck [Mon, 6 Dec 2010 21:11:01 +0000 (21:11 +0000)]
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!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121037
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 6 Dec 2010 19:55:05 +0000 (19:55 +0000)]
Another use of getSymbolOffset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121034
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 6 Dec 2010 19:08:48 +0000 (19:08 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121028
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 6 Dec 2010 18:57:40 +0000 (18:57 +0000)]
Revert r121021, which broke the buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121026
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 6 Dec 2010 18:47:44 +0000 (18:47 +0000)]
Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121024
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 6 Dec 2010 18:35:51 +0000 (18:35 +0000)]
Improve handling of Thumb2 PC-relative loads by converting LDRpci (and friends) to Pseudos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121021
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 6 Dec 2010 18:30:57 +0000 (18:30 +0000)]
Encode the register operand of ARM CondCode operands correctly. ARM::CPSR if
the instruction is predicated, reg0 otherwise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121020
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 6 Dec 2010 18:21:12 +0000 (18:21 +0000)]
The ARM AsmMatcher needs to know that the CCOut operand is a register value,
not an immediate. It stores either ARM::CPSR or reg0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121018
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 6 Dec 2010 18:04:39 +0000 (18:04 +0000)]
Do not try luck by using given name to create temporary file. In parallel builds it may not work.
This time for .s file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121016
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 6 Dec 2010 17:27:56 +0000 (17:27 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121006
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 6 Dec 2010 15:35:15 +0000 (15:35 +0000)]
Revert previous two patches while I try to find out how to make both
linux and darwin assemblers happy :-(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121004
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 6 Dec 2010 15:05:36 +0000 (15:05 +0000)]
Update test for the extra =.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121001
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 6 Dec 2010 14:53:14 +0000 (14:53 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121000
91177308-0d34-0410-b5e6-
96231b3b80d8
Frits van Bommel [Mon, 6 Dec 2010 10:48:11 +0000 (10:48 +0000)]
Fix clang warning: "extra ';' inside a class [-pedantic]".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120998
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 6 Dec 2010 07:52:42 +0000 (07:52 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120995
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 6 Dec 2010 07:43:04 +0000 (07:43 +0000)]
improve comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120994
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 6 Dec 2010 07:38:40 +0000 (07:38 +0000)]
improve -debug output and comments a little.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120993
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 6 Dec 2010 06:02:07 +0000 (06:02 +0000)]
Support/Windows: Make MinGW happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120991
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 6 Dec 2010 04:28:42 +0000 (04:28 +0000)]
Support/FileSystem: Add directory_iterator implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120989
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 6 Dec 2010 04:28:23 +0000 (04:28 +0000)]
Support/PathV2: Fix append to not add a slash to empty or root paths.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120988
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 6 Dec 2010 04:28:13 +0000 (04:28 +0000)]
Support/Windows: Add ScopedHandle and move some clients over to it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120987
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 6 Dec 2010 04:28:01 +0000 (04:28 +0000)]
KillTheDoctor: Cleanup error_code usage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120986
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 6 Dec 2010 04:27:52 +0000 (04:27 +0000)]
KillTheDoctor: Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120985
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 6 Dec 2010 04:27:42 +0000 (04:27 +0000)]
Support/ADT: Move c_str() from SmallString to SmallVectorImpl. The Windows PathV2
implementation needs it for wchar_t and SmallVectorImpl in general.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120984
91177308-0d34-0410-b5e6-
96231b3b80d8
Che-Liang Chiou [Mon, 6 Dec 2010 04:00:03 +0000 (04:00 +0000)]
ptx: add shift instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120982
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 6 Dec 2010 03:48:09 +0000 (03:48 +0000)]
Remove the getAddress getter, initialize Ordinal in the constructor and use
that on the ELF writer to detect a section we created.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120981
91177308-0d34-0410-b5e6-
96231b3b80d8