Chris Lattner
0fbe0f51a4
add support for target-specific ELF section flags, add a new MCSectionXCore
...
class which represents the XCore cp/dp section flags. No functionality
change yet.
llvm-svn: 79077
2009-08-15 05:56:11 +00:00
Dan Gohman
fca896815d
Simplify a few more things, eliminating a few more dependencies on
...
"the current basic block".
llvm-svn: 79069
2009-08-15 02:07:36 +00:00
Dan Gohman
e8c913e657
Simplify this code to not depend as much on CurMBB.
...
llvm-svn: 79068
2009-08-15 02:06:22 +00:00
Evan Cheng
75c9e535c6
Do not use frame register to reference fixed stack objects if the function is frameless.
...
llvm-svn: 79067
2009-08-15 02:05:35 +00:00
Dan Gohman
177102271d
Always check to see if raw_fd_ostream's file descriptor is attached to
...
a terminal, not just when it's STDOUT_FILENO.
llvm-svn: 79066
2009-08-15 02:05:19 +00:00
Dan Gohman
186b85dbcc
Add support for column computation on unbuffered streams.
...
llvm-svn: 79065
2009-08-15 02:02:59 +00:00
Dan Gohman
250635e3ac
Move FormattedStream's write_impl out of line.
...
llvm-svn: 79064
2009-08-15 02:01:04 +00:00
Dan Gohman
e9f0bf5dee
Remove an unnecessary #include.
...
llvm-svn: 79063
2009-08-15 01:56:38 +00:00
Chris Lattner
b1bf2009a4
switch DominanceFrontier::splitBlock to use a smallvector for
...
the pred list instead of a vector, saving a boat load of malloc/free's.
llvm-svn: 79062
2009-08-15 01:39:28 +00:00
Dan Gohman
0700a56860
On x86-64, for a varargs function, don't store the xmm registers to
...
the register save area if %al is 0. This avoids touching xmm
regsiters when they aren't actually used.
llvm-svn: 79061
2009-08-15 01:38:56 +00:00
Devang Patel
f691df3536
Do not completely skip subrange info for a zero sized array.
...
llvm-svn: 79044
2009-08-14 20:59:16 +00:00
Evan Cheng
7dae88d2c9
Leaf functions which do not save CSRs can be frameless even with -disable-fp-elim.
...
llvm-svn: 79039
2009-08-14 20:48:13 +00:00
Oscar Fuentes
cc756e70ad
CMake: Updated library dependence info.
...
llvm-svn: 79038
2009-08-14 20:30:18 +00:00
Eric Christopher
846e35b26c
Add sse4.2 string/text processing intrinsics. We'll select these later.
...
llvm-svn: 79037
2009-08-14 20:27:57 +00:00
Eric Christopher
86f7f77cc5
Whitespace cleanup.
...
llvm-svn: 79036
2009-08-14 20:27:12 +00:00
Anton Korobeynikov
a6b3ce203a
Allow targets to specify their choice of calling conventions per
...
libcall. Take advantage of this in the ARM backend to rectify broken
choice of CC when hard float is in effect. PIC16 may want to see if
it could be of use in MakePIC16Libcall, which works unchanged.
Patch by Sandeep!
llvm-svn: 79033
2009-08-14 20:10:52 +00:00
Evan Cheng
dc49a8d3f1
Add Thumb2 lsr hooks.
...
llvm-svn: 79032
2009-08-14 20:09:37 +00:00
Daniel Dunbar
6cb1eb5a6d
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).
llvm-svn: 79031
2009-08-14 19:59:24 +00:00
Oscar Fuentes
6b5cb8a6b3
CMake: Corrected variable check.
...
llvm-svn: 79030
2009-08-14 19:56:04 +00:00
Bruno Cardoso Lopes
c773141e66
*try* to use a better name to describe how common symbols are marked on the elf object file.
...
llvm-svn: 79029
2009-08-14 19:45:38 +00:00
Owen Anderson
8cd3566d6d
Add doxygen comments.
...
llvm-svn: 79027
2009-08-14 19:41:50 +00:00
Evan Cheng
09c070f4ce
80 col violation.
...
llvm-svn: 79026
2009-08-14 19:11:20 +00:00
Daniel Dunbar
c2346a3037
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).
llvm-svn: 79025
2009-08-14 19:10:46 +00:00
Anton Korobeynikov
c1524d442d
Cleanup the mess in msp430 target registration and hopefully unbreak the build
...
llvm-svn: 79024
2009-08-14 19:06:50 +00:00
Argyrios Kyrtzidis
ac74c4c2a1
Revert r78424.
...
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.
llvm-svn: 79023
2009-08-14 19:01:37 +00:00
Evan Cheng
9a58aff837
Indentation.
...
llvm-svn: 79022
2009-08-14 19:01:37 +00:00
Anton Korobeynikov
28381c05d4
Force reconfigure
...
llvm-svn: 79019
2009-08-14 18:53:19 +00:00
Daniel Dunbar
563a7e87e3
llvm-mc: zerofill shouldn't print quotes around the section,segment.
...
llvm-svn: 79017
2009-08-14 18:51:45 +00:00
Chris Lattner
0792195c5a
fix "pc" to be lower case in a target triple, patch by Yonggang Luo
...
llvm-svn: 79016
2009-08-14 18:48:13 +00:00
Anton Korobeynikov
384b336911
Hopefully unbreak cmake builds
...
llvm-svn: 79015
2009-08-14 18:46:49 +00:00
Evan Cheng
e41903b10d
Also shrink immediate branches; also more assembler workarounds.
...
llvm-svn: 79014
2009-08-14 18:31:44 +00:00
Anton Korobeynikov
52b7f0ad5f
Give MSP430 a separate asmprinter lib
...
llvm-svn: 79012
2009-08-14 18:28:12 +00:00
Daniel Dunbar
ef668c169b
llvm-mc: Support escaped characters in string literals (for .ascii and .asciz)
...
llvm-svn: 79010
2009-08-14 18:19:52 +00:00
Anton Korobeynikov
75821f7c69
Properly handle indirect win64 args when they're passed in memory
...
llvm-svn: 79009
2009-08-14 18:19:10 +00:00
Owen Anderson
6a95bcec19
Get the CPP backend into some semblance of working by updating for numerous LLVMContext changes,
...
as well as the StringRef change.
llvm-svn: 79006
2009-08-14 17:41:33 +00:00
Oscar Fuentes
1ea4b3a4b5
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.
llvm-svn: 79004
2009-08-14 16:59:41 +00:00
Daniel Dunbar
af590e5033
Take another shot at disabling this when no ppc support is available.
...
llvm-svn: 79003
2009-08-14 16:40:12 +00:00
Erick Tryzelaar
330b1b4cd8
A couple IRBuilder functions were still using getGlobalContext().
...
llvm-svn: 78997
2009-08-14 06:12:30 +00:00
Oscar Fuentes
5717a72863
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.
llvm-svn: 78996
2009-08-14 05:17:24 +00:00
Bob Wilson
6f34e278c7
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.
llvm-svn: 78995
2009-08-14 05:16:33 +00:00
Bob Wilson
eb54d51759
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.
llvm-svn: 78994
2009-08-14 05:13:08 +00:00
Bob Wilson
cce31f6831
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.
llvm-svn: 78993
2009-08-14 05:08:32 +00:00
Oscar Fuentes
7a87d6694e
CMake: Corrected indentation on a block of code.
...
llvm-svn: 78992
2009-08-14 04:55:21 +00:00
Oscar Fuentes
3fca0e811c
CMake: Use LLVM_COMMON_DEPENDS on add_llvm_executable.
...
llvm-svn: 78990
2009-08-14 04:38:57 +00:00
Oscar Fuentes
5444cb13ab
CMake: propagate to the parent scope LLVM_COMMON_DEPENDS. This is
...
necessary for the changes being effective on the successive targets
llvm-svn: 78989
2009-08-14 04:29:33 +00:00
Oscar Fuentes
67f7fbdf9e
CMake: updated list of source files for library MC.
...
llvm-svn: 78988
2009-08-14 04:14:45 +00:00
Daniel Dunbar
80d484e7cc
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. :)
llvm-svn: 78986
2009-08-14 03:48:55 +00:00
Daniel Dunbar
50327c561b
Add virtual printMCInst method to AsmPrinter, as a quick way to expose the API
...
to print one instruction.
llvm-svn: 78985
2009-08-14 03:43:57 +00:00
Daniel Dunbar
ad8740ae78
Add X86 instruction printer support for printing MCValue operands.
...
llvm-svn: 78984
2009-08-14 03:42:12 +00:00
Daniel Dunbar
1a019d8554
Add MCSymbol::{print, dump}
...
llvm-svn: 78983
2009-08-14 03:41:23 +00:00
Daniel Dunbar
afe6603590
Add MCValue::{print, dump}
...
llvm-svn: 78982
2009-08-14 03:11:09 +00:00
Daniel Dunbar
cbf4faf48d
llvm-mc: Move MCAsmToken::getLoc() into MC library where it belongs.
...
llvm-svn: 78980
2009-08-14 02:18:40 +00:00
Evan Cheng
dc1869661b
Indentation change.
...
llvm-svn: 78978
2009-08-14 01:56:37 +00:00
Oscar Fuentes
96147c60f1
CMake: updated library dependencies.
...
llvm-svn: 78976
2009-08-14 01:55:28 +00:00
Oscar Fuentes
9082c71057
CMake: build llvm-config before the other tools.
...
llvm-svn: 78975
2009-08-14 01:55:05 +00:00
Evan Cheng
db73d68cbe
Shrink ADR and LDR from constantpool late during constantpool island pass.
...
llvm-svn: 78970
2009-08-14 00:32:16 +00:00
Owen Anderson
7a336d3126
Add helpers for fetching basic types.
...
llvm-svn: 78969
2009-08-14 00:30:41 +00:00
Evan Cheng
76fa6e6a8f
New entry.
...
llvm-svn: 78968
2009-08-14 00:16:47 +00:00
Dan Gohman
dbeb33936f
Make TargetData optional in GlobalOpt and ArgumentPromotion.
...
llvm-svn: 78967
2009-08-14 00:11:03 +00:00
Dan Gohman
3e9dbe5a10
Make these matching rules more strict so that they don't
...
accidentally match unrelated things.
llvm-svn: 78966
2009-08-14 00:10:19 +00:00
Erick Tryzelaar
262332f24b
Expose LLVMContext to llvm-c.
...
llvm-svn: 78964
2009-08-14 00:01:31 +00:00
Dan Gohman
3e0bd7852f
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.
llvm-svn: 78963
2009-08-13 23:56:34 +00:00
Daniel Dunbar
9abdc6cc3c
TargetRegistry: Change AsmPrinter constructor to be typed as returning an
...
AsmPrinter instance (instead of just a FunctionPass)
llvm-svn: 78962
2009-08-13 23:48:47 +00:00
Daniel Dunbar
148edca7b8
Mark this test as requiring the powerpc target.
...
llvm-svn: 78961
2009-08-13 23:47:58 +00:00
Daniel Dunbar
aba5fb8c9a
llvm-mc: Add dummy MCStreamer implementation, (eventually) for use in profiling.
...
- Currently unused.
- A few other random comment fixes lumped in.
llvm-svn: 78960
2009-08-13 23:36:34 +00:00
Bruno Cardoso Lopes
62e6a8bbe6
Remove HasCrazyBSS and add a flag in TAI to indicate that '.section'
...
must be emitted for PowerPC-Linux '.bss' section
llvm-svn: 78958
2009-08-13 23:30:21 +00:00
Owen Anderson
a42ac6953b
Actually privatize a IntegerTypes, and fix a few bugs exposed by this.
...
llvm-svn: 78955
2009-08-13 23:27:32 +00:00
Dan Gohman
4af229e0eb
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.
llvm-svn: 78953
2009-08-13 23:18:56 +00:00
Dan Gohman
d57cbfc7d8
Make formatted_raw_ostream restore the buffer settings of the
...
underlying stream when it is finished, so that clients don't
have to do this manually.
llvm-svn: 78952
2009-08-13 23:16:59 +00:00
Dan Gohman
0809712def
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.
llvm-svn: 78951
2009-08-13 23:07:11 +00:00
Owen Anderson
55f1c09e31
Push LLVMContexts through the IntegerType APIs.
...
llvm-svn: 78948
2009-08-13 21:58:54 +00:00
Bruno Cardoso Lopes
d2d45a5575
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
llvm-svn: 78940
2009-08-13 21:25:27 +00:00
Bruno Cardoso Lopes
e795f7bed5
Add a method to return BSSSection from TargetLoweringObjectFile
...
llvm-svn: 78939
2009-08-13 21:10:28 +00:00
Bruno Cardoso Lopes
df743ae603
Add a method to return if the ELF section contains only common symbols!
...
llvm-svn: 78937
2009-08-13 21:08:56 +00:00
Dan Gohman
e6e417149f
Add unimplemented destructor declarations to hopefully address
...
compiler warnings on windows (PR4714).
llvm-svn: 78934
2009-08-13 20:43:13 +00:00
Dan Gohman
c04a00a0b0
Fix a compiler warning about comparing signed with unsigned.
...
llvm-svn: 78933
2009-08-13 20:32:03 +00:00
Misha Brukman
153292e55d
* Moved all tool version requirements to the same place
...
* Cleaned up multiple uses of literal version numbers and simplified 'cleaning'
llvm-svn: 78932
2009-08-13 20:29:30 +00:00
Misha Brukman
c8594a1add
Converted tabs to spaces.
...
llvm-svn: 78931
2009-08-13 20:12:48 +00:00
Misha Brukman
952784fbf5
Grammar fix.
...
llvm-svn: 78930
2009-08-13 20:08:52 +00:00
Daniel Dunbar
95f58463e5
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.
llvm-svn: 78928
2009-08-13 19:38:51 +00:00
Dan Gohman
9820555546
Add an assert to check copy_to_buffer's precondition.
...
llvm-svn: 78926
2009-08-13 18:38:15 +00:00
Dan Gohman
854ea3c580
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.
llvm-svn: 78924
2009-08-13 17:41:40 +00:00
Dan Gohman
84487b98a5
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.
llvm-svn: 78923
2009-08-13 17:27:29 +00:00
Daniel Dunbar
d81866827c
Add temporary hack to teach LLVM to reconfigure itself to pick up the new PIC16
...
AsmPrinter (in AsmPrinters.def).
llvm-svn: 78922
2009-08-13 17:22:49 +00:00
Daniel Dunbar
c01ed862c8
Reapply pieces of 78914 reverted in 78916, this has been fixed.
...
llvm-svn: 78921
2009-08-13 17:08:54 +00:00
Dan Gohman
f0b93441a4
Make raw_ostream non-copyable.
...
llvm-svn: 78920
2009-08-13 17:07:08 +00:00
Daniel Dunbar
86c065dd68
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
llvm-svn: 78919
2009-08-13 17:03:38 +00:00
Jim Grosbach
eba70d85cf
Add missing defs of R2 and D1.
...
llvm-svn: 78918
2009-08-13 16:59:44 +00:00
Daniel Dunbar
e95b32b057
Remove obsoleted files (from AsmPrinter move)
...
llvm-svn: 78917
2009-08-13 16:57:03 +00:00
Owen Anderson
ca232776ec
Revert r78914, as it was breaking the build.
...
llvm-svn: 78916
2009-08-13 16:54:39 +00:00
Dan Gohman
6dd7cb5dfe
Simplify this code so that it doesn't depend on raw_ostream being copyable.
...
llvm-svn: 78915
2009-08-13 16:51:51 +00:00
Sanjiv Gupta
89ec31a26a
Move PIC16 AsmPrinter to PIC16/AsmPrinter directory.
...
Remove CooperTargetMachine, as currently only one is supported.
llvm-svn: 78914
2009-08-13 16:37:05 +00:00
Jakob Stoklund Olesen
12de03ffc9
Track pristine registers as if they were live-in in the register scavenger.
...
llvm-svn: 78913
2009-08-13 16:20:04 +00:00
Jakob Stoklund Olesen
0e73fdff6c
Use pristine register info in machine code verifier.
...
So far these registers are simply tracked as if they were live-in.
llvm-svn: 78912
2009-08-13 16:19:51 +00:00
Jakob Stoklund Olesen
3de4a60e1e
Add MachineFrameInfo::getPristineRegisters(MBB) method.
...
llvm-svn: 78911
2009-08-13 16:19:33 +00:00
David Goodwin
90e6b8b708
Add callback to allow target to adjust latency of schedule dependency edge.
...
llvm-svn: 78910
2009-08-13 16:05:04 +00:00
Dan Gohman
54401d4174
Move SetBufferSize and SetUnbuffered out of line.
...
llvm-svn: 78909
2009-08-13 15:58:55 +00:00
David Goodwin
a9c2aad939
Finalize itineraries for cortex-a8 integer multiply
...
llvm-svn: 78908
2009-08-13 15:51:13 +00:00
Dan Gohman
52022c2373
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.
llvm-svn: 78907
2009-08-13 15:44:52 +00:00
Dan Gohman
8061d9e23f
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.
llvm-svn: 78906
2009-08-13 15:27:57 +00:00
Jim Grosbach
695e1c6087
Remove unnecessary newline
...
llvm-svn: 78905
2009-08-13 15:12:16 +00:00
Jim Grosbach
c96e88f8a5
Correct comment wording
...
llvm-svn: 78904
2009-08-13 15:11:43 +00:00
Chris Lattner
68535f7603
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.
llvm-svn: 78900
2009-08-13 06:28:06 +00:00
Jakob Stoklund Olesen
33733c0342
Fix the N>=64 case in the isInt<> and isUint<> templates.
...
llvm-svn: 78899
2009-08-13 06:24:02 +00:00
Evan Cheng
f59e9f4288
tPOP_RET now has predicate operands.
...
llvm-svn: 78898
2009-08-13 06:05:07 +00:00
Bob Wilson
3e4c012d54
Add a fixme message about canonicalizing floating-point vector types.
...
llvm-svn: 78897
2009-08-13 06:01:30 +00:00
Bob Wilson
ef6e602bf4
Revert r78852 for now. I want to do this differently, but I don't have time
...
to fix it tonight.
llvm-svn: 78896
2009-08-13 05:58:56 +00:00
Chris Lattner
00a8de054c
fix typo, add 10.6 version of test for my previous patch.
...
llvm-svn: 78895
2009-08-13 05:43:33 +00:00
Chris Lattner
58e8be847c
Restore some "small section" support code, reverting my patch from r76936.
...
llvm-svn: 78894
2009-08-13 05:41:27 +00:00
Evan Cheng
e5801bd220
It's ok to spill a tGPR register as long as it's still allocated a low register.
...
llvm-svn: 78893
2009-08-13 05:40:51 +00:00
Chris Lattner
eb68198145
fix a minor fixme. When building with SL and later tools, the ".eh" symbols
...
don't need to be exported from the .o files.
llvm-svn: 78892
2009-08-13 05:30:22 +00:00
Mon P Wang
a95379d165
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.
llvm-svn: 78891
2009-08-13 05:12:13 +00:00
Bruno Cardoso Lopes
607cd3b63a
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.
llvm-svn: 78890
2009-08-13 05:07:35 +00:00
Andreas Bolka
5c2764b3e9
Simplify conditional.
...
llvm-svn: 78889
2009-08-13 03:05:20 +00:00
Andreas Bolka
aef432505b
Simplify and reduce indentation using early exits.
...
No intended functionality change.
llvm-svn: 78888
2009-08-13 03:00:57 +00:00
Andreas Bolka
438ba80afa
DEBUGify some DOUTs.
...
llvm-svn: 78887
2009-08-13 02:45:03 +00:00
Andreas Bolka
177a2f5313
Prune trailing whitespace.
...
llvm-svn: 78886
2009-08-13 02:40:50 +00:00
Daniel Dunbar
3a1efd11bb
Convert APint::{fromString,APInt,getBitsNeeded} to use StringRef.
...
- Patch by Erick Tryzelaar, with some edits (and a bug fix) from me.
llvm-svn: 78885
2009-08-13 02:33:34 +00:00
Bob Wilson
c6800b55e6
Add a comment to describe why vector shuffles are legalized to custom DAG nodes.
...
llvm-svn: 78884
2009-08-13 02:13:04 +00:00
Daniel Dunbar
d0cfa88785
Add StringRef::front (with some small tweaks while I was in the area).
...
- Patch by Erick Tryzelaar
llvm-svn: 78883
2009-08-13 02:03:30 +00:00
Bob Wilson
fcd6361ad1
Use cast<> instead of dyn_cast<> in places where the type is known.
...
llvm-svn: 78881
2009-08-13 01:57:47 +00:00
Daniel Dunbar
7ee9649097
Update llvm-prof for ProfileInfo API changes.
...
- Patch by Erick Tryzelaar
llvm-svn: 78880
2009-08-13 01:55:43 +00:00
Dan Gohman
b4583b1b36
Change the indentation for LLVM Assembly files from 1 tab to 2 spaces.
...
This is vaguely consistent with LLVM's own source code, but more
importantly it lets more lines stay within 80 columns.
llvm-svn: 78879
2009-08-13 01:41:52 +00:00
Dan Gohman
ef3d457126
Various AsmWriter output cleanups. Use WriteAsOperand instead of
...
PrintUnmangledNameSafely.
llvm-svn: 78878
2009-08-13 01:36:44 +00:00
Chris Lattner
04b4700ebc
sink uniquing of sections out of MCContext into the ELF and PECOFF TLOF implementations.
...
MCContext no longer maintains a string -> section map.
llvm-svn: 78874
2009-08-13 00:37:15 +00:00
Dale Johannesen
5fa97f021c
Symbols with LinkerPrivateLinkage are weak.
...
This allows WebKit to build again.
llvm-svn: 78872
2009-08-13 00:28:52 +00:00
Chris Lattner
5ed8c4212a
make PIC16 unique its own sections instead of having mcontext do it.
...
llvm-svn: 78871
2009-08-13 00:26:52 +00:00
Chris Lattner
b691316838
add some comments: MCContext owns the MCSections, but it bump pointer allocates
...
them, so it doesn't have to explicitly free them.
llvm-svn: 78870
2009-08-13 00:21:53 +00:00
Chris Lattner
c0741ebb3a
reject invalid code like:
...
int x __attribute__((section("_foo, _bar"))) = 4;
int y __attribute__((section("_foo, _bar, 4byte_literals"))) = 1;
llvm-svn: 78867
2009-08-13 00:05:07 +00:00
Chris Lattner
2d5bdc2bce
implement support for uniquing MachO sections.
...
llvm-svn: 78866
2009-08-12 23:55:02 +00:00
Dan Gohman
69273e6474
Now that numbered types have their number printed, it's no longer
...
interesting to print the number in a comment. Numbered instructions
don't need their number in a comment either.
Also, tidy up newline printing.
llvm-svn: 78865
2009-08-12 23:54:22 +00:00
Chris Lattner
1fe315fe13
some compiler don't get string from TLOF.h implicitly or something.
...
llvm-svn: 78864
2009-08-12 23:53:59 +00:00
Chris Lattner
c4c3c66ff3
reduce #includage
...
llvm-svn: 78860
2009-08-12 23:34:27 +00:00
Dan Gohman
466876b0a6
Extend the AsmWriter to print unnamed numbered types as "%0 = type ..."
...
and unnamed numbered global variables as "@0 = global ...". Extend the
AsmParser to recognize these forms.
llvm-svn: 78859
2009-08-12 23:32:33 +00:00
Jim Grosbach
b6cac314aa
Mark the callsite intrinsic such that the opimizers know it's not dead.
...
llvm-svn: 78856
2009-08-12 23:03:43 +00:00
Bob Wilson
ff2db10211
Recognize Neon VDUP shuffles during legalization instead of selection.
...
llvm-svn: 78852
2009-08-12 22:54:19 +00:00
Bob Wilson
ea3a402ae7
Recognize Neon VREV shuffles during legalization instead of selection.
...
llvm-svn: 78850
2009-08-12 22:31:50 +00:00
Bob Wilson
f7e587fd53
Add a new "SDTCisVec" SDTypeConstraint. This complements the vAny type.
...
There have been a few times where I've wanted this but ended up leaving the
operand type unconstrained. It is easy to add this now and should help
catch errors in the future.
llvm-svn: 78849
2009-08-12 22:30:59 +00:00
Dan Gohman
1432ef864e
This void is implicit in C++.
...
llvm-svn: 78848
2009-08-12 22:10:57 +00:00
David Goodwin
1f8c7a76f7
Fix counting of Post-RA scheduling stalls. Improve debug output.
...
llvm-svn: 78843
2009-08-12 21:47:46 +00:00
Bob Wilson
2f6a79cbff
Add some release notes about ARM v7 support and known problems.
...
llvm-svn: 78842
2009-08-12 21:19:49 +00:00
Lang Hames
b4c6965da3
Added RegisterCoalescer to required passes for PBQP.
...
llvm-svn: 78840
2009-08-12 21:04:53 +00:00
Dan Gohman
1c0e13fe66
Use WriteAsOperand to print BasicBlock names.
...
llvm-svn: 78838
2009-08-12 20:56:56 +00:00
Dan Gohman
12dad639b5
Make AsmWriter more careful with formatted_raw_ostream so that
...
it doesn't leave the underlying stream in unbuffered mode when
the stream was originally buffered.
Also, change WriteAsOperand back to plain raw_ostream. This
lets it work for either formatted_raw_ostream or plain
raw_ostream, so that it doesn't have to force a buffer flush
on a plain raw_ostream.
llvm-svn: 78837
2009-08-12 20:56:03 +00:00
Dan Gohman
9099b179f2
Add a GetBufferSize() member to raw_ostream and use it to
...
simplify some formatted_raw_ostream code.
llvm-svn: 78836
2009-08-12 20:52:45 +00:00
Bob Wilson
4b35448360
Generate Neon VTBL and VTBX instructions from the corresponding intrinsics.
...
llvm-svn: 78835
2009-08-12 20:51:55 +00:00
Dan Gohman
d95c962d52
Use PadToColumn instead of tabs.
...
llvm-svn: 78834
2009-08-12 18:55:32 +00:00
Dan Gohman
aceb935add
Fix a few more places to use PadToColumn instead of tabs. And fix
...
the basic block label printing to check whether a block has a name
before printing a comment character and whitespace for it.
llvm-svn: 78830
2009-08-12 18:47:05 +00:00
Evan Cheng
aee7e49c50
PredCC is meant to be 2 bits wide, like PredCC1.
...
llvm-svn: 78829
2009-08-12 18:35:50 +00:00
Dan Gohman
942d2857ef
Use PadToColumn instead of tabs for aligning comments. Fix one place
...
that emitted unnecessary whitespace outside of VerboseAsm mode.
llvm-svn: 78828
2009-08-12 18:32:22 +00:00
David Goodwin
b369ee4c48
Enhance the InstrStage object to enable the specification of an Itinerary with overlapping stages. The default is to maintain the current behavior that the "next" stage immediately follows the previous one.
...
llvm-svn: 78827
2009-08-12 18:31:53 +00:00
Dale Johannesen
54be785be7
Add attempted idiotproofing comment per review.
...
llvm-svn: 78825
2009-08-12 18:04:11 +00:00
Chris Lattner
c02f3d866f
improve win32 path support, patch by Baptiste Lepilleur!
...
llvm-svn: 78823
2009-08-12 17:47:06 +00:00
Dale Johannesen
58043874ce
Test for 78821, sort of. While that bug is nondeterministic,
...
this test failed consistently on a Darwin build.
llvm-svn: 78822
2009-08-12 17:43:47 +00:00
Dale Johannesen
34c08bbbf9
Fix a nondeterministic bug in APInt::roundToDouble;
...
when !isSingleWord() but getActiveBits() is small,
we were using the pointer value instead of the low
word of the integer value.
llvm-svn: 78821
2009-08-12 17:42:34 +00:00
Dan Gohman
de51b4ebf4
Fix whitespace expectations to match the new AsmWriter behavior.
...
llvm-svn: 78819
2009-08-12 17:39:04 +00:00
Jim Grosbach
3cfc6463c9
Add catch block handling to SjLj exception handling.
...
llvm-svn: 78817
2009-08-12 17:38:44 +00:00
Dan Gohman
e274526d78
Make LLVM Assembly dramatically easier to read by aligning the comments,
...
using formatted_raw_ostream's PadToColumn.
Before:
bb1: ; preds = %bb
%2 = sext i32 %i.01 to i64 ; <i64> [#uses=1]
%3 = getelementptr double* %p, i64 %2 ; <double*> [#uses=1]
%4 = load double* %3, align 8 ; <double> [#uses=1]
%5 = fmul double %4, 1.100000e+00 ; <double> [#uses=1]
%6 = sext i32 %i.01 to i64 ; <i64> [#uses=1]
%7 = getelementptr double* %p, i64 %6 ; <double*> [#uses=1]
After:
bb1: ; preds = %bb
%2 = sext i32 %i.01 to i64 ; <i64> [#uses=1]
%3 = getelementptr double* %p, i64 %2 ; <double*> [#uses=1]
%4 = load double* %3, align 8 ; <double> [#uses=1]
%5 = fmul double %4, 1.100000e+00 ; <double> [#uses=1]
%6 = sext i32 %i.01 to i64 ; <i64> [#uses=1]
%7 = getelementptr double* %p, i64 %6 ; <double*> [#uses=1]
Several tests required whitespace adjustments.
llvm-svn: 78816
2009-08-12 17:23:50 +00:00
Bob Wilson
25cae66713
Fix TableGen warnings. This partly reverts my previous change to this file,
...
leaving the mayLoad and mayStore settings around only the load/store
instructions where those can't be inferred from the patterns.
llvm-svn: 78815
2009-08-12 17:04:56 +00:00
Dan Gohman
09b311f42f
Fix a missing newline (now that Value*'s operator<< doesn't append one).
...
llvm-svn: 78814
2009-08-12 16:48:27 +00:00
Chris Lattner
957d0587b6
change CBE to just get TAI now, instead of TM to get TAI.
...
llvm-svn: 78813
2009-08-12 16:41:44 +00:00
Dan Gohman
4ac2f639cd
Transform -X/C to X/-C, implementing a README.txt entry.
...
llvm-svn: 78812
2009-08-12 16:37:02 +00:00
Dan Gohman
908da3d97e
Optimize (x/C)*C to x if the division is exact.
...
llvm-svn: 78811
2009-08-12 16:33:09 +00:00
Dan Gohman
43103abef0
Update instcombine's debug output to account for Value*'s operator<<
...
not appending its own newline.
llvm-svn: 78810
2009-08-12 16:28:31 +00:00
Dan Gohman
5476cfdb15
Remove a bunch more now-unnecessary Context arguments.
...
llvm-svn: 78809
2009-08-12 16:23:25 +00:00
Dan Gohman
6b490ce4c7
Eliminate a bunch of now unnecessary explicit Context variables.
...
llvm-svn: 78808
2009-08-12 16:04:34 +00:00
Oscar Fuentes
bcbae01797
CMake: Added asm file to x86_64 MSVC build.
...
llvm-svn: 78807
2009-08-12 15:54:28 +00:00
Jim Grosbach
a5fdfac6ca
register naming cleanup (s/ip/r12/)
...
llvm-svn: 78806
2009-08-12 15:21:13 +00:00
Benjamin Kramer
9ace8b5763
Fix unit test on FreeBSD. We need to make sure there is enough space to save the pointer even if the memory returned from malloc was already aligned.
...
llvm-svn: 78805
2009-08-12 12:31:02 +00:00
Gabor Greif
55d2f75f0c
catch a typo and simplify call syntax
...
llvm-svn: 78804
2009-08-12 09:05:11 +00:00
Gabor Greif
27c7a9dfcd
here comes the CMAKE part on LLVM_COMPACT_SENTINELS; see also r78628 and r78661
...
llvm-svn: 78803
2009-08-12 08:37:37 +00:00
Chris Lattner
9a6cf91261
Change TargetAsmInfo to be constructed via TargetRegistry from a Target+Triple
...
pair instead of from a virtual method on TargetMachine. This cuts the final
ties of TargetAsmInfo to TargetMachine, meaning that MC can now use
TargetAsmInfo.
llvm-svn: 78802
2009-08-12 07:22:17 +00:00
Chris Lattner
1235f20744
one last (?) bad x86 triple test.
...
llvm-svn: 78801
2009-08-12 06:49:44 +00:00
Chris Lattner
6628e17344
fix some pastos in triple lines.
...
llvm-svn: 78800
2009-08-12 06:49:12 +00:00
Chris Lattner
8268cc9c77
the x86 version of the name is x86-64, not x86_64. Handle this properly
...
in getArchTypeForLLVMName.
llvm-svn: 78799
2009-08-12 06:45:02 +00:00
Chris Lattner
0ea6e4cc7f
another bogus triple
...
llvm-svn: 78798
2009-08-12 06:36:52 +00:00
Chris Lattner
e0971bc29f
add support for mingw64 target triples.
...
llvm-svn: 78797
2009-08-12 06:32:10 +00:00
Chris Lattner
8c2d846a42
fix another broken target triple.
...
llvm-svn: 78796
2009-08-12 06:29:18 +00:00
Chris Lattner
d4a70aedb0
fix an incorrect target triple.
...
llvm-svn: 78795
2009-08-12 06:28:51 +00:00
Jakob Stoklund Olesen
ee01029811
Move immediate constant predicate templates from the Blackfin target to MathExtras.h
...
llvm-svn: 78793
2009-08-12 06:22:07 +00:00
Chris Lattner
553c9f35a7
add a couple of helpers to the Triple class for decoding
...
the darwin version string. This should help consolidate
the variety of weird functions we have scattered around the
codebase that do stuff like this.
llvm-svn: 78792
2009-08-12 06:19:40 +00:00
Chris Lattner
774a88aa77
add nounwind
...
llvm-svn: 78791
2009-08-12 05:44:03 +00:00
Evan Cheng
bb2af3555c
Shrink Thumb2 movcc instructions.
...
llvm-svn: 78790
2009-08-12 05:17:19 +00:00
Oscar Fuentes
da3b250796
CMake: Fixed sed script for translating library dependencies from
...
LibDeps.txt format to LLVMLibDeps.cmake format.
llvm-svn: 78789
2009-08-12 04:18:10 +00:00
Oscar Fuentes
06eef1c2fe
CMake: Localized dependency on Perl.
...
llvm-svn: 78788
2009-08-12 04:16:19 +00:00
Oscar Fuentes
a88916d94f
CMake: Rely on llvm_config again for obtaining the list of required
...
libraries for an executable.
Now LLVMConfig uses a new system for sorting library dependencies, as
the list of dependent libraries for each entry of FinalLibDeps.txt no
longer is topologically sorted.
llvm-svn: 78787
2009-08-12 04:05:26 +00:00
Oscar Fuentes
1b9110699c
CMake: updated library dependencies.
...
llvm-svn: 78786
2009-08-12 03:57:26 +00:00
Oscar Fuentes
f7591af58e
CMake: cmake/modules/LLVMLibDeps.cmake: Use unix line endings.
...
llvm-svn: 78785
2009-08-12 03:36:43 +00:00
Oscar Fuentes
64f955b732
CMake: Moved hard-coded library dependencies to its own file.
...
llvm-svn: 78784
2009-08-12 03:32:44 +00:00
Evan Cheng
81348021b1
Remove another Darwin assembler workaround.
...
llvm-svn: 78779
2009-08-12 02:07:19 +00:00
Evan Cheng
fd10869d4b
80 col violation.
...
llvm-svn: 78778
2009-08-12 02:03:03 +00:00
Evan Cheng
608d92c943
Remove an Darwin assembler workaround.
...
llvm-svn: 78777
2009-08-12 01:56:42 +00:00
Evan Cheng
1e6c2a1c17
Shrink ADDS, ADC, RSB, and SUBS.
...
llvm-svn: 78776
2009-08-12 01:49:45 +00:00
Bob Wilson
9e8b647539
Add some comments to clarify the arguments to the vtbl and vtbx intrinsics.
...
llvm-svn: 78775
2009-08-12 01:48:30 +00:00
Bill Wendling
c1aa4edbde
Testcase for r78770.
...
llvm-svn: 78774
2009-08-12 01:47:51 +00:00
Dan Gohman
2a767c0d26
This logic was accidentally inverted in r78767.
...
llvm-svn: 78773
2009-08-12 01:44:20 +00:00
Oscar Fuentes
fc081d6139
CMake: Do not install files with .tmp suffix.
...
llvm-svn: 78769
2009-08-12 01:37:33 +00:00
Oscar Fuentes
c1341ea9de
CMake: Re-enabled build of llvm-config. Removed recursive invocation
...
of cmake.
llvm-svn: 78768
2009-08-12 01:36:27 +00:00
Dan Gohman
f7912edba5
Factor out the code for finding an available register for use
...
in breaking an anti-dependence into a separate function.
llvm-svn: 78767
2009-08-12 01:33:27 +00:00
Dale Johannesen
419a5b98ec
Test for llvm-gcc patch 78762.
...
llvm-svn: 78763
2009-08-12 01:14:30 +00:00
Bob Wilson
f042eadd1e
Add missing chain operands for VLD* and VST* instructions.
...
Set "mayLoad" and "mayStore" on the load/store instructions.
llvm-svn: 78761
2009-08-12 00:49:01 +00:00
Owen Anderson
117c9e8497
Add contexts to some of the MVT APIs. No functionality change yet, just the infrastructure work needed to get the contexts to where they need to be first.
...
llvm-svn: 78759
2009-08-12 00:36:31 +00:00
Dan Gohman
a3be3d7a89
llvm-gcc now emits inbounds for this getelementptr.
...
llvm-svn: 78758
2009-08-12 00:35:55 +00:00
Dan Gohman
76733748e1
Simplify this code, and use an in-bounds GEP.
...
llvm-svn: 78755
2009-08-12 00:32:55 +00:00
Oscar Fuentes
e93b54be8d
CMake: target triple for MSVC on Windows 64.
...
llvm-svn: 78753
2009-08-12 00:04:12 +00:00
Daniel Dunbar
3fb754af06
llvm-mc/AsmParser: Match hard coded registers (e.g. 'shldl %cl, %eax, %eax')
...
We now match all of 403.gcc (as emitted by clang). :)
llvm-svn: 78750
2009-08-11 23:23:44 +00:00
Chris Lattner
2b083cf989
prune #include
...
llvm-svn: 78749
2009-08-11 23:07:27 +00:00
Chris Lattner
b9c1d6c86e
prune #includage.
...
llvm-svn: 78748
2009-08-11 23:06:16 +00:00
Chris Lattner
96db1abb77
fix CodeGen/PowerPC/2007-01-15-AsmDialect.ll, fallout from r78742
...
llvm-svn: 78747
2009-08-11 23:03:40 +00:00
Chris Lattner
1e9097e36a
change the -x86-asm-syntax=intel/att flag to be in X86TAI
...
instead of X86 Subtarget. This elimianates dependencies on
X86Subtarget from X86TAI.
llvm-svn: 78746
2009-08-11 23:01:09 +00:00
Evan Cheng
f6a9d06241
Shrinkify Thumb2 r = add sp, imm.
...
llvm-svn: 78745
2009-08-11 23:00:31 +00:00
Chris Lattner
97868fe1b9
second half of commit.
...
llvm-svn: 78744
2009-08-11 22:52:15 +00:00
Chris Lattner
63d5be8a7b
pass "is64Bit" flag into PPC TAI ctors instead of a whole targetmachine.
...
llvm-svn: 78743
2009-08-11 22:51:34 +00:00
Chris Lattner
e655521a28
eliminate asmflavor from subtarget, PPCTAI is the only client
...
and each callee knows that it returns.
llvm-svn: 78742
2009-08-11 22:49:34 +00:00
Chris Lattner
abdcbc7ef2
Change the asmprinter to print the comment character before the
...
"inlineasmstart/end" strings so that the contents of the directive
are separate from the comment character. This lets elf targets
get #APP/#NOAPP for free even if they don't use "#" as the comment
character. This also allows hoisting the darwin stuff up to the
shared TAI class.
llvm-svn: 78737
2009-08-11 22:39:40 +00:00
David Goodwin
fd5defed1d
Allow a zero cycle stage to reserve/require a FU without advancing the cycle counter.
...
llvm-svn: 78736
2009-08-11 22:38:43 +00:00
Chris Lattner
54075a78b4
factorize more darwin TAI stuff. Note that this gives
...
darwin/arm support for .no_dead_strip
llvm-svn: 78734
2009-08-11 22:31:42 +00:00
Daniel Dunbar
526bcd461a
X86/AsmParser: Mark MOV64GSrm, MOV64FSrm, GS_MOV32rm, FS_MOV32rm as codegen only.
...
llvm-svn: 78733
2009-08-11 22:24:40 +00:00
Chris Lattner
6747b39ca5
factorize darwin ProtectedDirective and SetDirective.
...
llvm-svn: 78732
2009-08-11 22:22:44 +00:00
Daniel Dunbar
c4f8ea4ccb
Add 'isCodeGenOnly' bit to Instruction .td records.
...
- Used to mark fake instructions which don't correspond to an actual machine
instruction (or are duplicates of a real instruction). This is to be used for
"special cases" in the .td files, which should be ignored by things like the
assembler and disassembler. We still need a good solution to handle pervasive
duplication, like with the Int_ instructions.
- Set the bit on fake "mov 0" style instructions, which allows turning an
assembler matcher warning into a hard error.
- -2 FIXMEs.
llvm-svn: 78731
2009-08-11 22:17:52 +00:00
Chris Lattner
d832c8e87c
all darwin targets have .space and .zerofill, pull up.
...
llvm-svn: 78730
2009-08-11 22:17:31 +00:00
Chris Lattner
f710f71839
eliminate template from arm TAI
...
llvm-svn: 78729
2009-08-11 22:14:59 +00:00
Chris Lattner
374d5770f0
fix a bug I introduced in r78724 that caused failures in:
...
CodeGen/X86/dll-linkage.ll & CodeGen/X86/mingw-alloca.ll
llvm-svn: 78728
2009-08-11 22:12:58 +00:00
Chris Lattner
7faf1fd9a0
move LCOMMDirective = "\t.lcomm\t" up to DarwinTAI, eliminate
...
template in PPC backend for TAI.
llvm-svn: 78727
2009-08-11 22:06:07 +00:00
Owen Anderson
c6daf8f17c
Fix warnings.
...
llvm-svn: 78725
2009-08-11 21:59:30 +00:00
Chris Lattner
0909918514
eliminate the X86TargetAsmInfo template.
...
llvm-svn: 78724
2009-08-11 21:57:08 +00:00
Sean Callanan
f0e62eb78f
Added ADD instructions with rAX as one parameter to the Intel instruction
...
tables.
llvm-svn: 78721
2009-08-11 21:26:06 +00:00
Evan Cheng
cc9ca3500d
Shrinkify Thumb2 load / store multiple instructions.
...
llvm-svn: 78717
2009-08-11 21:11:32 +00:00
Daniel Dunbar
e431871851
llvm-mc/AsmParser: Allow target to specific a comment delimiter, which will be
...
used to strip hard coded comments out of .td assembly strings.
llvm-svn: 78716
2009-08-11 20:59:47 +00:00
Owen Anderson
828e2644fc
struct -> class
...
llvm-svn: 78715
2009-08-11 20:52:44 +00:00
Dan Gohman
dbae4db67a
Optimize exact sdiv by a constant power of 2 to ashr.
...
llvm-svn: 78714
2009-08-11 20:47:47 +00:00
Owen Anderson
9f94459d24
Split EVT into MVT and EVT, the former representing _just_ a primitive type, while
...
the latter is capable of representing either a primitive or an extended type.
llvm-svn: 78713
2009-08-11 20:47:22 +00:00
Daniel Dunbar
a1e04d43c4
StringRef: Add find(char) and find(StringRef).
...
Also, regroup functions.
llvm-svn: 78712
2009-08-11 20:47:15 +00:00
Chris Lattner
2c30970b22
pass the TargetTriple down from each target ctor to the
...
LLVMTargetMachine ctor. It is currently unused.
llvm-svn: 78711
2009-08-11 20:42:37 +00:00
Chris Lattner
67e5ea2726
now that JumpTableDirective can differentate picness itself, MIPS TAI
...
no longer needs a targetmachine to initialize itself.
llvm-svn: 78710
2009-08-11 20:32:51 +00:00
Chris Lattner
fe27130454
split "JumpTableDirective" (an existing hack) into a PIC and nonPIC
...
version. This allows TAI implementations to specify the directive to use
based on the mode being codegen'd for.
The real fix for this is to remove JumpTableDirective, but I don't feel
like diving into the jumptable snarl just now.
llvm-svn: 78709
2009-08-11 20:30:58 +00:00
Chris Lattner
d5a9179685
"TAI::JumpTableDirective" is always null for current arm targets, simplify
...
the code based on this and make it fall through better.
llvm-svn: 78708
2009-08-11 20:29:57 +00:00
Dan Gohman
77ad32ab0e
Add convenience functions for creating nsw add operators.
...
llvm-svn: 78707
2009-08-11 20:20:39 +00:00
Daniel Dunbar
34c8791ff0
llvm-mc/AsmMatcher: Fix two thinkos in determining whether two classes are
...
related.
llvm-svn: 78706
2009-08-11 20:10:07 +00:00
Dan Gohman
f9d12f23cb
Use wchar.h to get wchar_t, not ctype.h.
...
llvm-svn: 78703
2009-08-11 19:59:21 +00:00
Dan Gohman
221a2c711d
Don't set the isexact flag if an sdiv operator has been folded into
...
something else.
llvm-svn: 78702
2009-08-11 19:56:00 +00:00
Jim Grosbach
841850ed26
Add Thumb2 eh_sjlj_setjmp implementation
...
llvm-svn: 78701
2009-08-11 19:42:21 +00:00
Daniel Dunbar
919fe2bd2f
Simplify ConstantExpr::getInBoundsGetElementPtr and fix a possible crash, if
...
constant folding eliminated the GEP instruction.
- clang was hitting this on its test suite (for x86_64, at least).
llvm-svn: 78698
2009-08-11 18:28:09 +00:00
Daniel Dunbar
270968279b
Revert 78680 until I figure out why it completely broke things.
...
llvm-svn: 78697
2009-08-11 18:11:15 +00:00
Devang Patel
5c310be0ff
Link NamedMDNodes.
...
llvm-svn: 78696
2009-08-11 18:01:24 +00:00
Dan Gohman
50c09d0ca3
Add convenience functions for creating inbounds GEPs.
...
llvm-svn: 78695
2009-08-11 17:57:01 +00:00
David Goodwin
92492f2f8e
Use DEBUG macro for debug output.
...
llvm-svn: 78694
2009-08-11 17:56:42 +00:00
Chris Lattner
5d47e93532
add a trivial line # cache to SourceMgr to make repeated queries to
...
FindLineNumber much faster when in sequence.
llvm-svn: 78693
2009-08-11 17:49:14 +00:00
Daniel Dunbar
7f8a9ebc8d
llvm-mc: Fix a crash on invalid due to a typo in relocatable expression
...
evaluation.
llvm-svn: 78692
2009-08-11 17:47:52 +00:00
Benjamin Kramer
78c3bcb582
Make LLVMContext and LLVMContextImpl classes instead of structs.
...
llvm-svn: 78690
2009-08-11 17:45:13 +00:00
Daniel Dunbar
5c13812e2f
Remove some unnecessary LoadInst constructors, missed during Twinification.
...
llvm-svn: 78689
2009-08-11 17:38:47 +00:00
Chris Lattner
73e9f8c636
make owen happy by being explicit.
...
llvm-svn: 78688
2009-08-11 17:38:15 +00:00
David Goodwin
ebd694bb0a
Add some debug output.
...
llvm-svn: 78687
2009-08-11 17:35:23 +00:00
Benjamin Kramer
0334d91a4a
Fix struct/class mismatch.
...
llvm-svn: 78686
2009-08-11 17:27:20 +00:00
Dan Gohman
4bdbad7ebf
Use isa instead of dyn_cast when the result is only converted to bool.
...
llvm-svn: 78685
2009-08-11 17:20:16 +00:00
Devang Patel
6fdf5484c9
Fix cut-n-pasto in comment.
...
llvm-svn: 78684
2009-08-11 17:15:47 +00:00
Jim Grosbach
1d5350c08f
fix GetInstSizeInBytes for eh_sjlj_setjmp
...
llvm-svn: 78683
2009-08-11 17:08:15 +00:00
Dan Gohman
58f4d89a10
Add convenience functions for creating exact sdiv operators, and
...
use them in CreatePtrDiff.
llvm-svn: 78682
2009-08-11 17:05:24 +00:00
Dan Gohman
d6c611e6e8
Avoid implicitly depending on Instructions.h.
...
llvm-svn: 78681
2009-08-11 17:03:18 +00:00
Chris Lattner
ab2460c066
move some 32-bit instrs to x86instrinfo.td
...
llvm-svn: 78680
2009-08-11 16:58:39 +00:00
Benjamin Kramer
7570a9ceae
Revert 78662 to fix broken windows build. Add a comment which explains the problem.
...
llvm-svn: 78679
2009-08-11 16:41:22 +00:00
Benjamin Kramer
eda08015ee
This void is implicit in C++.
...
llvm-svn: 78678
2009-08-11 16:03:08 +00:00
Dan Gohman
7c50c9bd63
Tidy #includes.
...
llvm-svn: 78677
2009-08-11 16:02:12 +00:00
Dan Gohman
aa3fb65349
Simplify this code. The case where one class is GR64RegClass and the
...
other is a subclass of it is effectively handled by the prior tests.
llvm-svn: 78676
2009-08-11 15:59:48 +00:00
Dan Gohman
557baeeae4
Add an explicit keyword.
...
llvm-svn: 78675
2009-08-11 15:57:42 +00:00
Dan Gohman
f5adff9c41
ConstantFolder and NoFolder no longer require their Context members.
...
llvm-svn: 78673
2009-08-11 15:56:12 +00:00
Chris Lattner
0c533d909a
now that these are in file-check format, we can merge them together
...
into one bigger test (which runs faster)
llvm-svn: 78672
2009-08-11 15:54:17 +00:00
Dan Gohman
5211b0128b
Fix a typo in an assertion string.
...
llvm-svn: 78671
2009-08-11 15:53:15 +00:00
Dan Gohman
866d263392
Use the default copy-ctor, copy-assignment, and destructor.
...
llvm-svn: 78670
2009-08-11 15:52:30 +00:00
Dan Gohman
ce594f5d64
Add a comment about the additional meaning of setPreservesCFG() for
...
MachineFunctionPass passes.
llvm-svn: 78669
2009-08-11 15:50:56 +00:00
Dan Gohman
a72f856aa4
Don't assume that external global variables are aligned at their preferred
...
alignment. Only the minimum alignment guaranteed by the ABI may be assumed.
llvm-svn: 78668
2009-08-11 15:50:03 +00:00
Dan Gohman
c7c2bc9663
Remove unnecessary throw() specifications; LLVM doesn't use exceptions.
...
llvm-svn: 78667
2009-08-11 15:35:57 +00:00
Jim Grosbach
f24f9d9cb6
Whitespace cleanup. Remove trailing whitespace.
...
llvm-svn: 78666
2009-08-11 15:33:49 +00:00
Jim Grosbach
74eb9e7bfd
Move ~ARMConstantPoolValue() to the .cpp file to avoid needing to include <cstdlib> in the header.
...
llvm-svn: 78665
2009-08-11 15:26:27 +00:00
Dan Gohman
38484ceec9
Remove unnecessary casts.
...
llvm-svn: 78664
2009-08-11 15:15:10 +00:00
Dan Gohman
e02f9ba9b1
Add const qualifiers.
...
llvm-svn: 78663
2009-08-11 15:13:43 +00:00
Dan Gohman
b5147e845f
Remove an unnecessary mutable.
...
llvm-svn: 78662
2009-08-11 15:03:52 +00:00
Shantonu Sen
1f90bd277b
Regenerate per request of Gabor Greif (r78628)
...
llvm-svn: 78661
2009-08-11 13:39:52 +00:00
Benjamin Kramer
6d78d69586
Silence MSVC warning.
...
llvm-svn: 78660
2009-08-11 11:01:19 +00:00
Evan Cheng
806845daec
Fix the previous accidental commit. Now shrinking common Thumb2 load / store instructions.
...
llvm-svn: 78659
2009-08-11 09:37:40 +00:00
Evan Cheng
3606467709
Fix Thumb2 load / store addressing mode matching code. Do not use so_reg form to
...
match base only address, i.e. [r] since Thumb2 requires a offset register field.
For those, use [r + imm12] where the immediate is zero.
Note the generated assembly code does not look any different after the patch.
But the bug would have broken the JIT (if there is Thumb2 support) and it can
break later passes which expect the address mode to be well-formed.
llvm-svn: 78658
2009-08-11 08:52:18 +00:00
Evan Cheng
d4d352c663
80 column violation.
...
llvm-svn: 78657
2009-08-11 08:47:46 +00:00
Erick Tryzelaar
70ede4843c
Change llvm-c's ordering of contexts to make it consistent.
...
llvm-svn: 78656
2009-08-11 07:46:16 +00:00
Evan Cheng
192d7c0752
Cosmetic changes.
...
llvm-svn: 78655
2009-08-11 07:36:14 +00:00
Evan Cheng
6e62e93a8d
Adding a blank line back.
...
llvm-svn: 78654
2009-08-11 07:32:58 +00:00
Devang Patel
4d4a2e09a9
Link metadata.
...
llvm-svn: 78652
2009-08-11 06:46:31 +00:00
Devang Patel
c5aa8c6d29
Remove dead metadata.
...
llvm-svn: 78651
2009-08-11 06:31:57 +00:00
Jakob Stoklund Olesen
b39a5aa794
Rebuild RegScavenger::DistanceMap each time it is needed.
...
The register scavenger maintains a DistanceMap that maps MI pointers to their
distance from the top of the current MBB. The DistanceMap is built
incrementally in forward() and in bulk in findFirstUse(). It is used by
scavengeRegister() to determine which candidate register has the longest
unused interval.
Unfortunately the DistanceMap contents can become outdated. The first time
scavengeRegister() is called, the DistanceMap is filled to cover the MBB. If
then instructions are inserted in the MBB (as they always are following
scavengeRegister()), the recorded distances are too short. This causes bad
behaviour in the included test case where a register use /after/ the current
position is ignored because findFirstUse() thinks is is /before/ the current
position. A "using an undefined register" assertion follows promptly.
The fix is to build a fresh DistanceMap at the top of scavengeRegister(), and
discard it after use. This means that DistanceMap is no longer needed as a
RegScavenger member variable, and forward() doesn't need to update it.
The fix then discloses issue number two in the same test case: The candidate
search in scavengeRegister() finds a CSR that has been saved in the prologue,
but is currently unused. It would be both inefficient and wrong to spill such
a register in the emergency spill slot. In the present case, the emergency
slot restore is placed immediately before the normal epilogue restore, leading
to a "Redefining a live register" assertion.
Fix number two: When scavengerRegister() stumbles upon an unused register that
is overwritten later in the MBB, return that register early. It is important
to verify that the register is defined later in the MBB, otherwise it might be
an unspilled CSR.
llvm-svn: 78650
2009-08-11 06:25:12 +00:00
Daniel Dunbar
0c04f2b454
Fix a -Asserts warning.
...
- Since the function is never called in NDEBUG mode, just dropped the DEBUG()
uses here.
llvm-svn: 78649
2009-08-11 06:22:47 +00:00
Bob Wilson
8f5c447bfa
Convert more Neon tests to use FileCheck.
...
llvm-svn: 78648
2009-08-11 05:51:19 +00:00
Bob Wilson
12842f9865
Use vAny type to get rid of Neon intrinsics that differed only in whether
...
the overloaded vector types allowed floating-point or integer vector elements.
Most of these operations actually depend on the element type, so bitcasting
was not an option.
If you include the vpadd intrinsics that I updated earlier, this gets rid
of 20 intrinsics.
llvm-svn: 78646
2009-08-11 05:39:44 +00:00
Bob Wilson
781797f586
Fix a few more places in TableGen that need to handle EVT::vAny types.
...
llvm-svn: 78643
2009-08-11 05:03:38 +00:00
Daniel Dunbar
71527c1493
llvm-mc/X86: Parse '*' correctly (in the way the matcher expects).
...
llvm-svn: 78642
2009-08-11 05:00:25 +00:00
Daniel Dunbar
ba95a7cd8d
llvm-mc: Accept .word as a synonym for .short
...
llvm-svn: 78641
2009-08-11 04:44:00 +00:00
Daniel Dunbar
cd4eee5443
llvm-mc: Honor -o option (and add -f).
...
llvm-svn: 78640
2009-08-11 04:34:48 +00:00
Daniel Dunbar
a4b069ce00
llvm-mc: Sketch parsing for .file, .line, and .loc. No streamer hooks for these
...
yet (I'm not even sure what they do).
llvm-svn: 78639
2009-08-11 04:24:50 +00:00
Daniel Dunbar
9af747b421
llvm-mc: Fix darwin .section parsing. It was skipping the section name and a ','
...
(and outputting a diagnostic pointing at the wrong place), all of which lead to
much confusion.
llvm-svn: 78637
2009-08-11 03:42:33 +00:00
Daniel Dunbar
bb98db2d21
llvm-mc/AsmParser: Implement automatic classification of RegisterClass operands.
...
- This drops us to 123 ambiguous instructions (previously ~500) on X86.
llvm-svn: 78636
2009-08-11 02:59:53 +00:00
Sanjiv Gupta
dd4103b55b
Fixed more problems caused by 78142.
...
Passing of indirect arguments starts after return value on the callee's frame.
llvm-svn: 78635
2009-08-11 01:51:55 +00:00
David Goodwin
f20236ac83
Replace DOUT.
...
llvm-svn: 78634
2009-08-11 01:44:26 +00:00
Bob Wilson
741a9c7bf6
Use new EVT::vAny type to combine Neon intrinsics for VPADD.
...
llvm-svn: 78632
2009-08-11 01:15:26 +00:00
Bob Wilson
2cd5da8300
Add a new overloaded EVT::vAny type for use in TableGen to allow intrinsic
...
arguments that are vectors of any size and element type.
llvm-svn: 78631
2009-08-11 01:14:02 +00:00
Sean Callanan
5cfb60ffc7
Added the x86 INT instructions; both the special-case INT 3 and the general-case
...
INT i8. These instructions are only for interpretation by disassemblers, not
for emission, so they do not as yet have patterns.
llvm-svn: 78630
2009-08-11 01:09:06 +00:00
David Goodwin
b80734bb15
Fix bug in NEON convert for single-precision FP. This also fixes the tblgen warnings.
...
llvm-svn: 78629
2009-08-11 01:07:38 +00:00
Gabor Greif
bc0b457f93
Lay the groundwork for my upcoming ilist sentinel shrinking patch
...
by defining a LLVM_COMPACT_SENTINELS symbol to 0 or 1 in config.h.
I'm asking for 3 favors:
- may an autofoo expert look at this and suggest improvements?
- may a cmake expert suggest analogous functionality for config.h?
- may somebody with the right autofoo mix regenerate configure? (mine is too new)
Thanks!
--This line, and those below, will be ignored--
M configure.ac
llvm-svn: 78628
2009-08-11 00:59:39 +00:00
Jim Grosbach
9382d5ac05
Add stdlib.h
...
llvm-svn: 78627
2009-08-11 00:20:00 +00:00
Jim Grosbach
693e36a3e8
SjLj based exception handling unwinding support. This patch is nasty, brutish
...
and short. Well, it's kinda short. Definitely nasty and brutish.
The front-end generates the register/unregister calls into the SjLj runtime,
call-site indices and landing pad dispatch. The back end fills in the LSDA
with the call-site information provided by the front end. Catch blocks are
not yet implemented.
Built on Darwin and verified no llvm-core "make check" regressions.
llvm-svn: 78625
2009-08-11 00:09:57 +00:00
Evan Cheng
475f8a4fa2
Enable Thumb2 instruction shrinking (32-bit to 16-bit) pass. Convert a bunch of thumb2 tests to FileCheck.
...
llvm-svn: 78622
2009-08-10 23:56:04 +00:00
Lang Hames
3b90d973b0
Modified VNInfo. The "copy" member is now a union which holds the copy for a register interval, or the defining register for a stack interval. Access is via getCopy/setCopy and getReg/setReg.
...
llvm-svn: 78620
2009-08-10 23:43:28 +00:00
Dan Gohman
9d26c85bdc
Fix a bug in the DAGCombiner's handling of multiple linked
...
MERGE_VALUES nodes. Replacing the result values with the
operands in one MERGE_VALUES node may cause another
MERGE_VALUES node be CSE'd with the first one, and bring
its uses along, so that the first one isn't dead, as this
code expects. Fix this by iterating until the node is
really dead. This fixes PR4699.
llvm-svn: 78619
2009-08-10 23:43:19 +00:00
Dan Gohman
733a64db57
Fix a bug where DAGCombine was producing an illegal ConstantFP
...
node after legalize, and remove the workaround code from the
ARM backend.
llvm-svn: 78615
2009-08-10 23:15:10 +00:00
David Goodwin
d9aedcae23
Use FileCheck.
...
llvm-svn: 78614
2009-08-10 23:14:14 +00:00
David Goodwin
bdf1a1d1a2
Use FileCheck... its good for you...
...
llvm-svn: 78613
2009-08-10 23:06:57 +00:00
Devang Patel
9b4ea1c474
Remove MDNode from ValueMap when MDNode is destroyed.
...
llvm-svn: 78612
2009-08-10 22:59:46 +00:00
David Goodwin
9e7c7e748f
Fix test.
...
llvm-svn: 78611
2009-08-10 22:58:08 +00:00
Owen Anderson
53aa7a960c
Rename MVT to EVT, in preparation for splitting SimpleValueType out into its own struct type.
...
llvm-svn: 78610
2009-08-10 22:56:29 +00:00
Eric Christopher
d91dceea0f
Whitespace, 80-column, and isTwoAddress -> Constraints = "" changes.
...
No functional change.
llvm-svn: 78608
2009-08-10 22:37:37 +00:00
Devang Patel
2c6c743039
Rename MDNodeSet as MDNodes.
...
llvm-svn: 78607
2009-08-10 22:31:31 +00:00
David Goodwin
108b522912
Fix test.
...
llvm-svn: 78606
2009-08-10 22:31:04 +00:00
Devang Patel
33dadac722
Align comments.
...
llvm-svn: 78605
2009-08-10 22:20:38 +00:00
David Goodwin
85b5b027f7
Use NEON for single-precision int<->FP conversions.
...
llvm-svn: 78604
2009-08-10 22:17:39 +00:00
Devang Patel
148e9f0d3f
Do not rely on magic "llvm.dbg.*" global variable name to find debug info.
...
PIC16 developers, please verify.
llvm-svn: 78603
2009-08-10 22:11:20 +00:00
Devang Patel
d0658efdca
Keep track of DIType.
...
llvm-svn: 78602
2009-08-10 22:09:58 +00:00
Owen Anderson
eddff647ac
Remove a bunch of debugging code that was slowing PBQP down by 25% or so.
...
llvm-svn: 78601
2009-08-10 21:49:45 +00:00
Eric Christopher
458c91732c
Fix up whitespace, remove commented out code.
...
llvm-svn: 78600
2009-08-10 21:48:58 +00:00
Daniel Dunbar
e4f79d140d
llvm-mc/AsmParser: Disambiguate i64i8imm.
...
llvm-svn: 78598
2009-08-10 21:06:41 +00:00
Daniel Dunbar
aeb1feb67a
llvm-mc/AsmParser: Allow .td users to redefine the names of the methods to call
...
on target specific operands for testing class membership and converting to
MCInst operands.
llvm-svn: 78597
2009-08-10 21:00:45 +00:00
Daniel Dunbar
009ac1ae04
Rename ConvertType to ConvertConstant to avoid a name conflict on llvm-gcc.
...
llvm-svn: 78596
2009-08-10 20:56:46 +00:00
Owen Anderson
3e77df2bcd
SimpleValueType-ify a few more methods on TargetLowering.
...
llvm-svn: 78595
2009-08-10 20:46:15 +00:00
Evan Cheng
f72c13bdf5
Handle the constantfp created during post-legalization dag combiner phase.
...
llvm-svn: 78594
2009-08-10 20:25:59 +00:00
Owen Anderson
246617857f
Continue the SimpleValueType-ification.
...
llvm-svn: 78593
2009-08-10 20:18:46 +00:00
Erick Tryzelaar
a1025faf84
Fix ocaml "make check" tests, that wasn't finding the proper c++ compiler.
...
llvm-svn: 78592
2009-08-10 19:45:05 +00:00
Erick Tryzelaar
48708c9641
Fix comment in llvm.mli.
...
llvm-svn: 78591
2009-08-10 19:45:00 +00:00
Erick Tryzelaar
e4fa5ac925
Convert comments to C90-style so llvm-c can import DataTypes.h.
...
llvm-svn: 78590
2009-08-10 19:44:53 +00:00
Erick Tryzelaar
c475d136cb
Fix docstring for ocaml binding's const_float.
...
llvm-svn: 78589
2009-08-10 19:44:45 +00:00
Daniel Dunbar
26454f794c
llvm-mc/AsmMatcher: Remove some code which has been obsoleted by move to
...
explicit parser match classes.
llvm-svn: 78588
2009-08-10 19:08:50 +00:00
Daniel Dunbar
0afe2cc097
llvm-mc/AsmMatcher: Fix thinko, Mem isn't a subclass of Imm.
...
llvm-svn: 78587
2009-08-10 19:08:02 +00:00
Devang Patel
0bdbee14cd
We are not using FoldingSet for metadata uniquing anymore.
...
llvm-svn: 78585
2009-08-10 18:59:07 +00:00
Owen Anderson
c30530d105
Start moving TargetLowering away from using full MVTs and towards SimpleValueType, which will simplify the privatization of IntegerType in the future.
...
llvm-svn: 78584
2009-08-10 18:56:59 +00:00
Daniel Dunbar
17410a4b92
llvm-mc/AsmMatcher: Change assembler parser match classes to their own record
...
structure.
llvm-svn: 78581
2009-08-10 18:41:10 +00:00
Benjamin Kramer
850e0f9e7e
g++ 4.0 doesn't have std::vector::data.
...
llvm-svn: 78579
2009-08-10 18:27:33 +00:00
Owen Anderson
13234f83ac
Change the MDNode uniquing to a ValueMap, at Devang's request.
...
llvm-svn: 78577
2009-08-10 18:16:08 +00:00
Chris Lattner
6c20391d38
split MachO section handling stuff out to its out .h/.cpp file.
...
llvm-svn: 78576
2009-08-10 18:15:01 +00:00
Chris Lattner
97189e5d04
add a fixme
...
llvm-svn: 78575
2009-08-10 18:05:55 +00:00
Chris Lattner
fbcafd4c6c
arm only needs to emit one .align directive for hidden nlp's, not one
...
per pointer.
llvm-svn: 78574
2009-08-10 18:02:16 +00:00
Chris Lattner
292472d3d3
make sure that arm nonlazypointers are aligned properly
...
llvm-svn: 78573
2009-08-10 18:01:34 +00:00
Chris Lattner
ec64b73712
Fix a weird ppc64-specific link error during an llvm-gcc build:
...
ld: bad offset (0x00000091) for lo14 instruction pic-base fix-up in ___popcountdi2 from libgcc/./_popcountsi2_s.o
The problem is that the non lazy symbol pointers need to be 8 byte aligned
on ppc64 and .section doesn't have an implicit alignment like ".non_lazy_symbol_pointer"
does.
llvm-svn: 78572
2009-08-10 17:58:51 +00:00
Chris Lattner
7b01bf6125
fix some warnings for the MSVC build, by Yonggang Luo!
...
llvm-svn: 78571
2009-08-10 17:35:42 +00:00
Dan Gohman
b717091e69
Make this comment more closely reflect the code.
...
llvm-svn: 78569
2009-08-10 16:50:32 +00:00
Dan Gohman
676d115ce5
Add nounwind keywords.
...
llvm-svn: 78568
2009-08-10 16:48:40 +00:00
David Greene
f354b6ef90
Add support for printing loop structure information in asm comments.
...
This definitely slows down asm output so put it under an -asm-exuberant
flag.
This information is useful when doing static analysis of performance
issues.
llvm-svn: 78567
2009-08-10 16:38:07 +00:00
Devang Patel
714612b1eb
Clarify limitations of a ModulePass requiring a FunctionPass.
...
llvm-svn: 78566
2009-08-10 16:37:29 +00:00
Daniel Dunbar
2587b61533
llvm-mc/AsmParser: Check for matches with super classes when matching
...
instruction operands.
llvm-svn: 78565
2009-08-10 16:05:47 +00:00
David Goodwin
62e053b790
Checkpoint scheduling itinerary changes.
...
llvm-svn: 78564
2009-08-10 15:56:13 +00:00
David Goodwin
6021b4dccc
Post RA scheduler changes. Introduce a hazard recognizer that uses the target schedule information to accurately model the pipeline. Update the scheduler to correctly handle multi-issue targets.
...
llvm-svn: 78563
2009-08-10 15:55:25 +00:00
Evan Cheng
5bb93ce769
Watch out for empty BB.
...
llvm-svn: 78562
2009-08-10 08:10:13 +00:00
Evan Cheng
8a640ae504
rev, rev16, and revsh do not set CPSR.
...
llvm-svn: 78561
2009-08-10 07:58:45 +00:00
Evan Cheng
f16a1d5b79
Duh. Most 16-bit Thumb rr instructions are two-address. Fix table.
...
llvm-svn: 78560
2009-08-10 07:20:37 +00:00
Evan Cheng
1f5bee14a1
CPSR can be livein; transfer predicate operands correctly; tMUL is two-address.
...
llvm-svn: 78559
2009-08-10 06:57:42 +00:00
Evan Cheng
092b701a2c
Add support for folding loads / stores into 16-bit moves used by Thumb2.
...
llvm-svn: 78558
2009-08-10 06:32:05 +00:00
Evan Cheng
55c014a9f3
80 col violation.
...
llvm-svn: 78557
2009-08-10 05:51:48 +00:00
Evan Cheng
f5b73869f2
Use tMOVgpr2gpr instead of t2MOVr.
...
llvm-svn: 78556
2009-08-10 05:49:43 +00:00
Daniel Dunbar
1bf60c257c
Add support for a user supplied pointer argument to llvm_install_error_handler.
...
llvm-svn: 78553
2009-08-10 03:36:26 +00:00
Bruno Cardoso Lopes
9b3484dd14
Move ConstantExpr handling to ResolveConstantExpr method and also
...
add support for PtrToInt, Add, Mul.
llvm-svn: 78552
2009-08-10 03:32:40 +00:00
Evan Cheng
51cbd2d6c4
Add support to reduce most of 32-bit Thumb2 arithmetic instructions.
...
llvm-svn: 78550
2009-08-10 02:37:24 +00:00
Evan Cheng
5b4c308f0c
Always use the 16-bit tMOVgpr2gpr instead of the 32-bit t2MOVr.
...
llvm-svn: 78549
2009-08-10 02:06:53 +00:00
Chris Lattner
cb307a27bf
Make the big switch: Change MCSectionMachO to represent a section *semantically*
...
instead of syntactically as a string. This means that it keeps track of the
segment, section, flags, etc directly and asmprints them in the right format.
This also includes parsing and validation support for llvm-mc and
"attribute(section)", so we should now start getting errors about invalid
section attributes from the compiler instead of the assembler on darwin.
Still todo:
1) Uniquing of darwin mcsections
2) Move all the Darwin stuff out to MCSectionMachO.[cpp|h]
3) there are a few FIXMEs, for example what is the syntax to get the
S_GB_ZEROFILL segment type?
llvm-svn: 78547
2009-08-10 01:39:42 +00:00
Chris Lattner
aea9dfc167
add a simple back() method to StringRef.
...
llvm-svn: 78544
2009-08-10 00:44:02 +00:00
Benjamin Kramer
6e046f4291
Use abs64 instead abs; some platforms don't have a 64-bit abs overload. Noticed by Yonggang Luo!
...
llvm-svn: 78543
2009-08-09 22:37:07 +00:00
Evan Cheng
d461c1c559
Add support to convert 32-bit instructions to 16-bit non-two-address ones.
...
llvm-svn: 78540
2009-08-09 19:17:19 +00:00
Chris Lattner
f4c2eee251
always end a section with \n on elf.
...
llvm-svn: 78534
2009-08-09 15:31:10 +00:00
Daniel Dunbar
d9631912cf
llvm-mc/AsmParser: Fix thinko in ClassInfo::operator<.
...
llvm-svn: 78533
2009-08-09 08:23:23 +00:00
Daniel Dunbar
e0891c2109
llvm-mc/AsmParser: Add hack to ignore Int_* and *_Int instructions for now, to
...
make it easier to see interesting ambiguities.
- Also, check that user doesn't try to redefine the super class. This is a wart
in the current design, in that assembler match classes aren't explicitly
declared somewhere (so there isn't a unique place to declare the super
class). This should probably be fixed.
llvm-svn: 78532
2009-08-09 08:19:00 +00:00
Daniel Dunbar
5877782962
Disable this test for now, we don't check for super classes when matching yet.
...
llvm-svn: 78531
2009-08-09 07:35:56 +00:00
Daniel Dunbar
8e33cb2de1
llvm-mc/AsmParser: Implement user defined super classes.
...
- We can now discriminate SUB32ri8 from SUB32ri, for example.
llvm-svn: 78530
2009-08-09 07:20:21 +00:00
Bob Wilson
7fc63417d7
Add tests for Neon VZIP and VUZP instructions.
...
llvm-svn: 78529
2009-08-09 06:48:29 +00:00
Bob Wilson
f60c8807e8
Add a test for Neon VTRN instructions.
...
llvm-svn: 78528
2009-08-09 06:30:46 +00:00
Daniel Dunbar
f573b563e1
llvm-mc/AsmParser: Separate instruction ordering for ambiguity detection.
...
- We want the ordering operation to be simple, since we run it on every
match. The old ordering is also not a strict weak ordering when there are
ambiguities, which makes MSVC unhappy.
- While we are at it, detect all ambiguities instead of just the adjacent
ones. There are actually 655, for X86.
llvm-svn: 78526
2009-08-09 06:05:33 +00:00
Bob Wilson
45fa71a392
Change Neon table lookup (VTBL) and table extension (VTBX) intrinsics to
...
take the table vectors as separate arguments, instead of the previous
approach where they were combined into one big vector.
llvm-svn: 78525
2009-08-09 06:03:09 +00:00
Daniel Dunbar
447c4ab91d
Extend comment on ParserMatchClass .td field, and add some missing
...
classes for X86.
llvm-svn: 78524
2009-08-09 06:00:04 +00:00
Daniel Dunbar
c32aa060bd
llvm-mc/AsmParser: Define match classes in the .td file.
...
-2 FIXMEs.
llvm-svn: 78523
2009-08-09 05:18:30 +00:00
Daniel Dunbar
3239f020eb
llvm-mc/AsmParser: Sketch infrastructure for ordering instructions & detecting
...
ambiguities.
- Currently there are 483 ambiguities to resolve. :)
llvm-svn: 78522
2009-08-09 04:00:06 +00:00
Daniel Dunbar
22dd774d8f
STLExtras: Add less_ptr.
...
llvm-svn: 78521
2009-08-09 03:36:59 +00:00
Chris Lattner
b7ff9e84be
fix edito
...
llvm-svn: 78520
2009-08-08 23:43:55 +00:00
Daniel Dunbar
d8c822f180
llvm-mc/AsmMatcher: Tweak string matcher (missed a newline).
...
llvm-svn: 78518
2009-08-08 23:43:16 +00:00
Chris Lattner
591105c540
sink the 'name' and 'isdirective' state out of MCSection into its derived classes.
...
This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-)
llvm-svn: 78517
2009-08-08 23:39:42 +00:00
Anton Korobeynikov
cfed3005e5
Use subclassing to print lane-like immediates (w/o hash) eliminating
...
'no_hash' modifier. Hopefully this will make Daniel happy :)
llvm-svn: 78514
2009-08-08 23:10:41 +00:00
Daniel Dunbar
5478125143
llvm-mc/AsmMatcher: Tweak string matcher.
...
- Track whether we need to insert an explicit 'break'.
- Invert conditional when matching a single prefix to reduce
nesting/bracing/breaking.
- wc -l of X86GenAsmMatcher.inc decreased by 10%. :)
llvm-svn: 78513
2009-08-08 22:57:25 +00:00
Chris Lattner
c51023b0bc
remove nondeterminstic test.
...
llvm-svn: 78512
2009-08-08 22:56:37 +00:00
Chris Lattner
3219d85f16
add a note about dead zero extends.
...
llvm-svn: 78511
2009-08-08 22:46:59 +00:00
Chris Lattner
1cb9396f4f
1. Make MCSection an abstract class.
...
2. Move section switch printing to MCSection virtual method which takes a
TAI. This eliminates textual formatting stuff from TLOF.
3. Eliminate SwitchToSectionDirective, getSectionFlagsAsString, and
TLOFELF::AtIsCommentChar.
llvm-svn: 78510
2009-08-08 22:41:53 +00:00
Chris Lattner
089b7de20d
switch this to create coff sections for now, it doesn't really matter for
...
llvm-mc's purpose yet and we'll want to switch to creating semantic sections
at some point.
llvm-svn: 78509
2009-08-08 22:38:48 +00:00
Eric Christopher
7dfa9f2e56
Add crc32 instruction and intrinsics. Add a new class of prefix
...
bytes for F2 0F 38 and propagate. Add a FIXME for a set
of possibilities which correspond to intrinsics already used.
New test.
llvm-svn: 78508
2009-08-08 21:55:08 +00:00
Jakob Stoklund Olesen
e2dc8a46e9
Add support for READCYCLECOUNTER in Blackfin back-end.
...
llvm-svn: 78506
2009-08-08 21:42:22 +00:00
Chris Lattner
26cc5b78d0
add new PIC16Section class, this time hopefully not breaking the build :)
...
llvm-svn: 78505
2009-08-08 21:37:01 +00:00
Daniel Dunbar
66f4f54e8a
llvm-mc/AsmMatcher: Switch token matching to use the new string matcher.
...
Also, redefined MatchRegisterName to just return the register value or a
sentinel, to simplify the generated code.
llvm-svn: 78504
2009-08-08 21:22:41 +00:00
Daniel Dunbar
59410aaea6
Revert r78501, it doesn't build.
...
--- Reverse-merging r78501 into '.':
U lib/Target/PIC16/PIC16TargetObjectFile.cpp
D lib/Target/PIC16/PIC16Section.h
llvm-svn: 78503
2009-08-08 21:12:40 +00:00
Chris Lattner
4a4e4487fc
make PIC16 create its own custom MCSection.
...
llvm-svn: 78501
2009-08-08 20:55:25 +00:00
Chris Lattner
245fdfb9c3
make target-specific TLOF impls (except PIC16) create target-specific
...
MCSection instances.
llvm-svn: 78500
2009-08-08 20:52:13 +00:00
Chris Lattner
5a9bc50fa8
stub out PECOFF/MachO/ELF MCSection classes
...
llvm-svn: 78499
2009-08-08 20:50:49 +00:00
Chris Lattner
c9ea8fddb2
eliminate TargetLoweringObjectFileSparc in favor of a TAI hook.
...
A TAI hook is appropriate in this case because this is just an
asm syntax issue, not a semantic difference. TLOF should model
the semantics of the section.
llvm-svn: 78498
2009-08-08 20:43:12 +00:00
Jakob Stoklund Olesen
dc6bccbaa6
Don't build illegal ops in DAGCombiner::SimplifyBinOpWithSameOpcodeHands().
...
Blackfin supports and/or/xor on i32 but not on i16. Teach
DAGCombiner::SimplifyBinOpWithSameOpcodeHands to not produce illegal nodes
after legalize ops.
llvm-svn: 78497
2009-08-08 20:42:17 +00:00
Chris Lattner
36d04ec972
give pic16 a target-specific section creation name too
...
llvm-svn: 78496
2009-08-08 20:23:47 +00:00
Chris Lattner
ce7d14032b
now that getOrCreateSection is all object-file specific,
...
give the impls an object-file-specific name. In the future
they can take different arguments etc.
llvm-svn: 78495
2009-08-08 20:22:20 +00:00
Chris Lattner
302041d5c9
sink getOrCreateSection down into all the object file implementations,
...
now that they create *all* the sections.
llvm-svn: 78494
2009-08-08 20:14:13 +00:00
Eric Christopher
e7064fdc9d
Fix some cut and paste-os.
...
llvm-svn: 78493
2009-08-08 20:09:33 +00:00
Chris Lattner
00e2e74fb2
add a little function to do arbitrary string pattern matching in a
...
much more efficient way than a sequence of if's. Switch MatchRegisterName
to use it. It would be nice if someone could factor this out to a shared
place in tblgen :)
llvm-svn: 78492
2009-08-08 20:02:57 +00:00
Chris Lattner
16cf1967f5
add another const
...
llvm-svn: 78487
2009-08-08 19:16:05 +00:00
Chris Lattner
099003bc19
remove a useless anon-ns, make table const.
...
llvm-svn: 78486
2009-08-08 19:15:25 +00:00
Daniel Dunbar
2f140834cf
Some ProfileInfo cleanups.
...
- Part of optimal static profiling patch sequence by Andreas Neustifter.
llvm-svn: 78485
2009-08-08 18:59:03 +00:00
Daniel Dunbar
003a1b1c1d
Add a basic static ProfileInfo provider (ProfileEstimatorPass).
...
- Part of optimal static profiling patch sequence by Andreas Neustifter.
llvm-svn: 78484
2009-08-08 18:44:18 +00:00
Eric Christopher
31cceaeb68
Define intrinsics for crc instruction.
...
llvm-svn: 78482
2009-08-08 18:07:59 +00:00
Bruno Cardoso Lopes
f6448f57e6
Use reloc_absolute_word_sext relocation for X86::MOV64(ri/mi)32 instructions,
...
since they are in 64 bit mode with i64immSExt32 imms. JIT is not affected since
it handles both word absolute relocations in the same way
llvm-svn: 78479
2009-08-08 17:47:41 +00:00
Daniel Dunbar
3b5008e23a
More ProfileInfo improvements.
...
- Part of optimal static profiling patch sequence by Andreas Neustifter.
- Store edge, block, and function information separately for each functions
(instead of in one giant map).
- Return frequencies as double instead of int, and use a sentinel value for
missing information.
llvm-svn: 78477
2009-08-08 17:43:09 +00:00
Bruno Cardoso Lopes
72dd2eef36
ELF improvements:
...
Handle large integers, x86_fp80, ConstantAggregateZero, and two more ConstantExpr:
GetElementPtr and IntToPtr
Set SHF_MERGE bit for mergeable strings
Avoid zero initialized strings to be classified as a bss symbol
Don't allow common symbols to be classified as STB_WEAK
Add a constant to be used as a global value offset in data relocations
llvm-svn: 78476
2009-08-08 17:29:04 +00:00
Daniel Dunbar
028f6dc4c2
Update CMake
...
llvm-svn: 78475
2009-08-08 17:03:13 +00:00
Jakob Stoklund Olesen
dcf009ca20
Clean out per-function data after the machine code verifier is done with it.
...
Also don't dereference old pointers after they have been deleted causing
random crashes when enabling the machine code verifier.
Ahem...
I have not included a test case for the crash. It hapened when enabling the
verifier on CodeGen/X86/2009-08-06-branchfolder-crash.ll.
The crash depends on an MBB being allocated at the same address as a
previously deleted MBB. I don't think that can be reproduced reliably.
llvm-svn: 78472
2009-08-08 15:34:50 +00:00
Anton Korobeynikov
7167f33872
Add insert_elt / extract_elt patterns for v4f32 stuff.
...
Did anyone tests v4f32 ever?
llvm-svn: 78470
2009-08-08 14:06:07 +00:00
Anton Korobeynikov
4218516f5d
Lane number should be printed w/o hash
...
llvm-svn: 78469
2009-08-08 14:05:53 +00:00
Anton Korobeynikov
887d05ce9b
Use VLDM / VSTM to spill/reload 128-bit Neon registers
...
llvm-svn: 78468
2009-08-08 13:35:48 +00:00
Jakob Stoklund Olesen
2d59cfff24
Update the machine code verifier to keep up with the scavenger.
...
* Cleaner handling of <undef>.
* <def> takes precedence over <def,dead>.
* Implement the OK-to-redefine-a-register-that-was-
live-in-but-has-not-been-used-before rule.
llvm-svn: 78467
2009-08-08 13:19:25 +00:00
Jakob Stoklund Olesen
8e96c6abf7
Remove RegisterScavenger::isSuperRegUsed(). This completely reverses the mistaken commit r77904.
...
Now there is no special treatment of instructions that redefine part of a
super-register. Instead, the super-register is marked with <imp-use,kill> and
<imp-def>. For instance, from LowerSubregs on ARM:
subreg: CONVERTING: %Q1<def> = INSERT_SUBREG %Q1<undef>, %D1<kill>, 5
subreg: %D2<def> = FCPYD %D1<kill>, 14, %reg0, %Q1<imp-def>
subreg: CONVERTING: %Q1<def> = INSERT_SUBREG %Q1, %D0<kill>, 6
subreg: %D3<def> = FCPYD %D0<kill>, 14, %reg0, %Q1<imp-use,kill>, %Q1<imp-def>
llvm-svn: 78466
2009-08-08 13:19:10 +00:00
Jakob Stoklund Olesen
ac51533b8a
Simplify RegScavenger::forward a bit more.
...
Verify that early clobber registers and their aliases are not used.
All changes to RegsAvailable are now done as a transaction so the order of
operands makes no difference.
The included test case is from PR4686. It has behaviour that was dependent on the order of operands.
llvm-svn: 78465
2009-08-08 13:18:47 +00:00
Andrew Lenharth
e372826523
move this fp select into a pattern
...
llvm-svn: 78464
2009-08-08 12:49:07 +00:00
Benjamin Kramer
7641cf8e4d
Always initialize AsmConds.
...
llvm-svn: 78463
2009-08-08 11:26:50 +00:00
Benjamin Kramer
611307108c
MSVC doesn't like member variables with the same name as the class.
...
llvm-svn: 78462
2009-08-08 10:06:30 +00:00
Daniel Dunbar
541efcc5c4
llvm-mc/AsmMatcher: Improve match code.
...
- This doesn't actually improve the algorithm (its still linear), but the
generated (match) code is now fairly compact and table driven. Still need a
generic string matcher.
- The table still needs to be compressed, this is quite simple to do and should
shrink it to under 16k.
- This also simplifies and restructures the code to make the match classes more
explicit, in anticipation of resolving ambiguities.
llvm-svn: 78461
2009-08-08 07:50:56 +00:00
Bob Wilson
e2231070ff
Implement Neon VZIP and VUZP instructions. These are very similar to VTRN,
...
so I generalized the class for VTRN in the .td file to handle all 3 of them.
llvm-svn: 78460
2009-08-08 06:13:25 +00:00
Bob Wilson
db46af0461
Implement Neon VTRN instructions. For now, anyway, these are selected
...
directly from the intrinsics produced by the frontend. If it is more
convenient to have a custom DAG node for using these to implement shuffles,
we can add that later.
llvm-svn: 78459
2009-08-08 05:53:00 +00:00
Daniel Dunbar
713302883e
llvm-mc/AsmMatcher: Switch to a unified function to convert operands to MCInst,
...
so that terminal states are as simple as possible.
- If we were willing to assume that the order that operands get inserted in the
MCInst is fixed we could actually dispose with this altogether, although it
might be nice to have the flexibility to change it later.
llvm-svn: 78458
2009-08-08 05:24:34 +00:00
Evan Cheng
1be453b462
Add a skeleton Thumb2 instruction size reduction pass.
...
llvm-svn: 78456
2009-08-08 03:21:23 +00:00
Evan Cheng
2aa91cc2be
Code refactoring. No functionality change.
...
llvm-svn: 78455
2009-08-08 03:20:32 +00:00
Evan Cheng
274fcbe43e
tADDhirr should target GPR, not tGPR.
...
llvm-svn: 78454
2009-08-08 03:19:44 +00:00
Evan Cheng
4dc201eb64
I can type.
...
llvm-svn: 78453
2009-08-08 02:54:37 +00:00
Chris Lattner
b94284b5e2
make printInstruction return void since its result is omitted. Make the
...
error condition get trapped with an assert.
llvm-svn: 78449
2009-08-08 01:32:19 +00:00
Daniel Dunbar
4bfb4c80e0
Fix some -Asserts unused variable warnings.
...
llvm-svn: 78447
2009-08-08 00:40:46 +00:00
Andreas Bolka
3becda83ef
Add another Strong-SIV testcase.
...
llvm-svn: 78446
2009-08-08 00:21:49 +00:00
Chris Lattner
b1692dc267
don't check the result of printInstruction anymore.
...
llvm-svn: 78444
2009-08-08 00:05:42 +00:00
Anton Korobeynikov
674ffc1e59
Do not generate 32-bit call on win64 when imm does not fit
...
llvm-svn: 78443
2009-08-07 23:59:21 +00:00
Chris Lattner
6eceb7c85d
rename test
...
llvm-svn: 78441
2009-08-07 23:57:30 +00:00
Chris Lattner
ff8d04e815
merge a bunch of tests together into one, convert to filecheck which
...
is more tolerant of whitespace differences.
llvm-svn: 78439
2009-08-07 23:56:42 +00:00
Bob Wilson
40ff4a190f
Add new intrinsics for Neon VTRN, VZIP and VUZP operations. Modeling these
...
as vector shuffles did not work out well. Shuffles that produce double-wide
vectors accurately represent the operation but make it hard to do anything
with the results. I considered splitting them up into 2 shuffles, one to
write each register separately, but there doesn't seem to be a good way to
reunite them for codegen.
llvm-svn: 78437
2009-08-07 23:53:05 +00:00
Daniel Dunbar
11595b20fc
Add DEBUG_WITH_TYPE as a clean alternative to tweaking DEBUG_TYPE.
...
This:
--
#undef DEBUG_TYPE
#define DEBUG_TYPE "foo"
DEBUG(...)
#undef DEBUG_TYPE
#define DEBUG_TYPE ""
--
becomes this:
--
DEBUG_WITH_TYPE("foo", ...)
--
llvm-svn: 78435
2009-08-07 23:48:59 +00:00
Bob Wilson
97262e01d5
Convert more Neon tests to use FileCheck.
...
llvm-svn: 78433
2009-08-07 23:45:02 +00:00
Chris Lattner
84b9db2926
code cleanup
...
llvm-svn: 78432
2009-08-07 23:42:01 +00:00
Benjamin Kramer
dd71ebbab0
Unbreak build.
...
llvm-svn: 78431
2009-08-07 23:37:47 +00:00
David Goodwin
742db6a6d4
Make NEON single-precision FP support the default for cortex-a8 (again).
...
llvm-svn: 78430
2009-08-07 23:32:33 +00:00
Chris Lattner
e35472e3a9
remove a bunch of now-dead crud from the asmprinter and TAI interfaces.
...
llvm-svn: 78428
2009-08-07 23:16:27 +00:00
Chris Lattner
2d423d5a95
fix the column output stuff in the asmwriter from being dynamic and
...
driven by TAI to being static, driven by tblgen. This means that a
target doesn't get impacted by this stuff at all if it doesn't opt
into it.
llvm-svn: 78427
2009-08-07 23:13:38 +00:00
Andreas Bolka
7a5c8db6b5
Fix copy-pasto.
...
llvm-svn: 78426
2009-08-07 22:55:26 +00:00