Chris Lattner
12c2c17ac7
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
0ce07529b3
Support/PathV2: Cleanup separator handling.
...
llvm-svn: 121110
2010-12-07 03:57:48 +00:00
Michael J. Spencer
a96fe51fa6
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
7c3efd63d4
Support/PathV2: Move make_absolute from path to fs.
...
llvm-svn: 121108
2010-12-07 03:57:17 +00:00
Rafael Espindola
9ede5ef045
Fix pcrel relocations that cross sections.
...
llvm-svn: 121107
2010-12-07 03:50:14 +00:00
NAKAMURA Takumi
159722407b
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
f260cf36f0
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
63bff1a5d3
test: Add the feature 'shell' on LLVM_ON_UNIX.
...
llvm-svn: 121104
2010-12-07 02:43:51 +00:00
NAKAMURA Takumi
7947c9770a
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
cab6997dc8
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
d03fbe7b3d
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
5996a47663
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
48ba44334f
Remove unused member.
...
llvm-svn: 121098
2010-12-07 01:32:45 +00:00
Francois Pichet
95e129a686
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
4c0dfbd472
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
2953ba9e66
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
6874ebd344
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
cfd185355b
Support/PathV2: Use SmallVector::clear instead of set_size.
...
llvm-svn: 121092
2010-12-07 01:23:19 +00:00
Michael J. Spencer
a59a7b3965
Support/PathV2: Clarify and correct documentation.
...
llvm-svn: 121091
2010-12-07 01:23:08 +00:00
Michael J. Spencer
898af0f235
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
f909f96f2b
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
6492963708
Fix whitespace.
...
llvm-svn: 121086
2010-12-07 01:12:19 +00:00
Rafael Espindola
c98cc0b286
Fix a crash reduced from gcc produced assembly.
...
llvm-svn: 121085
2010-12-07 01:09:54 +00:00
Owen Anderson
81f8b084e6
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
7a95053a98
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
81b06f0d93
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
8dad37785c
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
2d361b9318
Add fixup for Thumb1 BL/BLX instructions.
...
llvm-svn: 121072
2010-12-06 23:57:07 +00:00
Frits van Bommel
1494a2f6fe
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
12459bc442
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
6fe7fe8dd4
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
82d3d8dc2c
Use references to simplify the code a bit.
...
llvm-svn: 121050
2010-12-06 22:30:54 +00:00
Wesley Peck
ffdbf99b57
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
996c76c27e
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
672ef014da
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
599e271a46
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
c726be7d0a
use getSymbolOffset.
...
llvm-svn: 121041
2010-12-06 21:51:55 +00:00
Chris Lattner
2f134ca2cc
Use a stronger predicate here, pointed out by Duncan
...
llvm-svn: 121040
2010-12-06 21:48:10 +00:00
Chris Lattner
2907722386
add some DEBUG statements.
...
llvm-svn: 121038
2010-12-06 21:13:51 +00:00
Wesley Peck
b168ddedaa
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
fd0cc5d13f
Another use of getSymbolOffset.
...
llvm-svn: 121034
2010-12-06 19:55:05 +00:00
Rafael Espindola
65c25aef87
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
8e9cb84ea2
Revert r121021, which broke the buildbots.
...
llvm-svn: 121026
2010-12-06 18:57:40 +00:00
Jim Grosbach
f2e0e808ba
Trailing whitespace.
...
llvm-svn: 121024
2010-12-06 18:47:44 +00:00
Owen Anderson
0c51a02230
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
6c27b4f3cf
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
c79c6290ee
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
a4d6774cf8
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
3e954d16f4
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
4ec917db9b
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