Daniel Dunbar [Fri, 14 Aug 2009 19:59:24 +0000 (19:59 +0000)]
llvm-mc: Fix bugs where bytes were unintentionally being printed as signed.
- We now print all of 403.gcc cleanly (llvm-mc -> 'as' as diffed to 'as'), minus two
'rep;movsl' instructions (which I missed before).
Daniel Dunbar [Fri, 14 Aug 2009 19:10:46 +0000 (19:10 +0000)]
llvm-mc: When handling a .set, make sure to print subsequent references to the
symbol as the symbol name itself, not the expression it was defined to. These
have different semantics due to the quirky .set behavior (which absolutizes an
expression that would otherwise be treated as a relocation).
In order for the changes in r78424 to work properly, cast_retty<X,Y> should return an object instead of a reference, and it's not clear that this approach has real advantages.
Oscar Fuentes [Fri, 14 Aug 2009 16:59:41 +0000 (16:59 +0000)]
CMake: Automatic regeneration of the library dependencies file.
It doesn't stop or reconfigure the build, though, so the user will see
a broken build that magically succeeds at the next attempt. It is
technically possible to halt the build with a helpful message, and
even to automatically restart the build using the new dependencies as
it we did when llvm-config was used by cmake for learning
dependencies. This is left on the TODO list.
Oscar Fuentes [Fri, 14 Aug 2009 05:17:24 +0000 (05:17 +0000)]
CMake: Builds main LLVM Target library before its sublibraries. This
way we ensure that tablegenned files exist before they are #include'd
by the LLVM Target sublibraries. Required for parallel builds.
Bob Wilson [Fri, 14 Aug 2009 05:16:33 +0000 (05:16 +0000)]
Now that all the legal Neon shuffles (or at least the ones that have been
implemented so far) are recognized during legalization, it is easy to fall
back to the default expansion for other shuffles.
Bob Wilson [Fri, 14 Aug 2009 05:13:08 +0000 (05:13 +0000)]
Create a new ARM-specific DAG node, VDUP, to represent a splat from a
scalar_to_vector. Generate these VDUP nodes during legalization instead
of trying to recognize the pattern during selection.
Bob Wilson [Fri, 14 Aug 2009 05:08:32 +0000 (05:08 +0000)]
During legalization, change Neon vdup_lane operations from shuffles to
target-specific VDUPLANE nodes. This allows the subreg handling for the
quad-register version to be done easily with Pats in the .td file, instead
of with custom code in ARMISelDAGToDAG.cpp.
Daniel Dunbar [Fri, 14 Aug 2009 03:48:55 +0000 (03:48 +0000)]
Update llvm-mc / MCAsmStreamer to print the instruction using the actual target
specific printer (this only works on x86, for now).
- This makes it possible to do some correctness checking of the parsing and
matching, since we can compare the results of 'as' on the original input, to
those of 'as' on the output from llvm-mc.
- In theory, we could now have an easy ATT -> Intel syntax converter. :)
Dan Gohman [Thu, 13 Aug 2009 23:56:34 +0000 (23:56 +0000)]
Fix MCSectionELF::ShouldOmitSectionDirective's matching of .data and
friends so that it doesn't match sections like .data.rel.local, which
should not be emitted as section directives.
Dan Gohman [Thu, 13 Aug 2009 23:18:56 +0000 (23:18 +0000)]
When standard output is a terminal, set outs() to be unbuffered, to
mimic the behavior of stdtout, which is line-buffered when the output
is a terminal. This fixes some issues with bugpoint output appearing
being printed out of order.
Dan Gohman [Thu, 13 Aug 2009 23:07:11 +0000 (23:07 +0000)]
Take the fast path for any named value and any GlobalValue, which doesn't
need TypePrinting despite being a subclass of Constant. This fixes
compile-time problems especially visible on 403.gcc when -asm-verbose is
enabled.
Remove hack used to strip unwanted chars from section name
Use MCSectionELF methods as much as possible, removing some
ELFWriter methods which are now unused
Daniel Dunbar [Thu, 13 Aug 2009 19:38:51 +0000 (19:38 +0000)]
TargetRegistry: Reorganize AsmPrinter construction so that clients pass in the
TargetAsmInfo. This eliminates a dependency on TargetMachine.h from
TargetRegistry.h, which technically was a layering violation.
- Clients probably can only sensibly pass in the same TargetAsmInfo as the
TargetMachine has, but there are only limited clients of this API.
Dan Gohman [Thu, 13 Aug 2009 17:41:40 +0000 (17:41 +0000)]
Set raw_os_ostream, raw_string_ostream, and raw_svector_ostream to be
unbuffered. std::ostream does its own buffering, and std::string and
SmallVector both have allocation strategies intended to handle frequent
appending.
Dan Gohman [Thu, 13 Aug 2009 17:27:29 +0000 (17:27 +0000)]
Add support to raw_ostream for sizing the buffer according to the
needs of the underlying output mechanism. raw_fd_ostream now uses
st_blksize from fstat to determine a buffer size.
Daniel Dunbar [Thu, 13 Aug 2009 17:03:38 +0000 (17:03 +0000)]
Revert 78892 and 78895, these break generating working executables on
x86_64-apple-darwin10.
--- Reverse-merging r78895 into '.':
U test/CodeGen/PowerPC/2008-12-12-EH.ll
U lib/Target/DarwinTargetAsmInfo.cpp
--- Reverse-merging r78892 into '.':
U include/llvm/Target/DarwinTargetAsmInfo.h
U lib/Target/X86/X86TargetAsmInfo.cpp
U lib/Target/X86/X86TargetAsmInfo.h
U lib/Target/ARM/ARMTargetAsmInfo.h
U lib/Target/ARM/ARMTargetMachine.cpp
U lib/Target/ARM/ARMTargetAsmInfo.cpp
U lib/Target/PowerPC/PPCTargetAsmInfo.cpp
U lib/Target/PowerPC/PPCTargetAsmInfo.h
U lib/Target/PowerPC/PPCTargetMachine.cpp
G lib/Target/DarwinTargetAsmInfo.cpp
Dan Gohman [Thu, 13 Aug 2009 15:44:52 +0000 (15:44 +0000)]
Fix the buffer handling logic so that write_impl is always called with
a full buffer, rather than often being called with a
slightly-less-than-full buffer.
Dan Gohman [Thu, 13 Aug 2009 15:27:57 +0000 (15:27 +0000)]
Fix a 4x slowdown in llc -asm-verbose caused by the use of
WriteAsOperand in more places.
Now that more things are using WriteAsOperand, its behavior of
constructing a TypePrinting object and populating it with strings for all
the numbered types in the Module on each call is a significant bottleneck.
Fancier solutions could be pursued here, but for now, just bypass the
TypePrinting overhead in obvious cases.
Chris Lattner [Thu, 13 Aug 2009 06:28:06 +0000 (06:28 +0000)]
reintroduce support for Mips "small" section handling. This is
implemented somewhat differently than before, but it should have
the same functionality and the previous testcase passes again.
Mon P Wang [Thu, 13 Aug 2009 05:12:13 +0000 (05:12 +0000)]
When InstCombine simplifies a load -> extract element to gep -> load, place
the new load by the old load instead of by the extract element because
a store could have occurred between the load and extract element.
Change MCSectionELF to represent a section semantically instead of
syntactically as a string, very similiar to what Chris did with MachO.
The parsing support and validation is not introduced yet.