Chris Lattner
e8bf2d5ad3
Fix some minor typos and grammar.
...
llvm-svn: 131835
2011-05-22 04:44:48 +00:00
Charles Davis
bc2daa0f93
Implement emission of all Win64 exception tables. Make the COFF streamer emit
...
these tables.
llvm-svn: 131833
2011-05-22 04:15:07 +00:00
Charles Davis
1c8bd5ad7e
Make the COFF streamer emit unwind info when processing a .seh_handlerdata
...
directive.
Implement emission of Win64 EH unwind info.
Pull in <cassert> in MCWin64EH.h so it can use the assert() macro.
llvm-svn: 131832
2011-05-22 03:01:05 +00:00
Chris Lattner
6078926e26
random comment cleanups.
...
llvm-svn: 131829
2011-05-22 00:50:53 +00:00
Chris Lattner
b5865ded27
remove StandardPasses, it has been replaced with PassManagerBuilder
...
llvm-svn: 131827
2011-05-22 00:30:45 +00:00
Chris Lattner
fa9fe70a6a
add support for LTO passes.
...
llvm-svn: 131820
2011-05-22 00:14:20 +00:00
Charles Davis
a8805fd71a
Include DataTypes.h from this header to get the uint*_t types.
...
llvm-svn: 131817
2011-05-22 00:05:26 +00:00
Charles Davis
4ccc861cbc
Allow access to the .pdata and .xdata sections through the TargetAsmInfo
...
class.
llvm-svn: 131816
2011-05-22 00:03:24 +00:00
Chris Lattner
34cc63cd71
add an extension point mechanism that allow plugins to add stuff to
...
the pass manager.
llvm-svn: 131814
2011-05-21 23:50:37 +00:00
Nick Lewycky
babca9aee9
Add CreateLifetimeStart and CreateLifetimeEnd to the IRBuilder, with plans to
...
use these soon.
llvm-svn: 131812
2011-05-21 23:14:36 +00:00
Chris Lattner
790cb34f93
add a new PassManagerBuilder class to replace StandardPasses.h
...
llvm-svn: 131807
2011-05-21 20:39:42 +00:00
Chris Lattner
4c0d9e2249
add a copy ctor to TargetLibraryInfo.
...
llvm-svn: 131806
2011-05-21 20:09:13 +00:00
Eli Friedman
3de2ddc578
PR7952: Make isa<> use the same logic as cast<>, so that they both work
...
consistently.
llvm-svn: 131803
2011-05-21 19:13:10 +00:00
Charles Davis
8e8f59bdfb
A handler for a function in the Win64 EH scheme can be both an unwind handler
...
and an exception handler. Handle that case.
Also, add an 'Emitted' member to the MCWin64EHUnwindInfo struct. It will be
needed later.
llvm-svn: 131791
2011-05-21 15:57:49 +00:00
Andrew Trick
d5d0764b3b
Have Program::Wait return -2 for crashed and timeouts instead of embedding
...
info in the error message. Per Dan's request.
llvm-svn: 131780
2011-05-21 00:56:46 +00:00
Charles Davis
bc1feb1f25
Add .pdata and .xdata sections to the COFF TLOF implementation.
...
llvm-svn: 131763
2011-05-20 22:13:55 +00:00
Argyrios Kyrtzidis
ac8bc12cd1
Add asserts in StringRef to make sure we avoid undefined behavior:
...
-strlen should not be called with NULL. Also guarantee that StringRef's Length is 0 if Data is NULL.
-memcmp should not be called with NULL (even if size is 0)
Patch by Matthieu Monrocq!
llvm-svn: 131747
2011-05-20 19:24:12 +00:00
Andrew Trick
f44aadf0fd
indvars: Prototyping Sign/ZeroExtend elimination without canonical IVs.
...
No functionality enabled by default. Use -disable-iv-rewrite.
Extended IVUsers to keep track of the phi that represents the users' IV.
Added the WidenIV transform to replace a narrow IV with a wide IV
by doing a one-for-one replacement of IV users instead of expanding the
SCEV expressions. [sz]exts are removed and truncs are inserted.
llvm-svn: 131744
2011-05-20 18:25:42 +00:00
Benjamin Kramer
cc7a928885
Remove noisy semicolons.
...
llvm-svn: 131724
2011-05-20 09:20:25 +00:00
Rafael Espindola
8e129296fe
Misc code refactorings:
...
* Remove unnecessary arguments now that ForceExpAbs is a method.
* Use ForceExpAbs in EmitAbsValue.
llvm-svn: 131683
2011-05-19 21:40:34 +00:00
Charles Davis
de745ba396
Implement the EndProlog Win64 EH method on the base MCStreamer.
...
llvm-svn: 131679
2011-05-19 21:24:54 +00:00
Charles Davis
7e6e8951af
Implement the Win64 EH prolog instruction methods on the base MCStreamer.
...
I had to change the API slightly to avoid overloading issues.
llvm-svn: 131666
2011-05-19 19:35:55 +00:00
Eli Friedman
d2144a9fb8
Fix up the new StandardPasses to run the same scalarrepl passes as the old one.
...
llvm-svn: 131665
2011-05-19 19:14:54 +00:00
Joerg Sonnenberger
74ba2623ce
Reapply 131644 including the missing header changes:
...
Introduce -fatal-assembler-warnings for the obvious purpose
llvm-svn: 131655
2011-05-19 18:00:13 +00:00
Charles Davis
4cd8856704
Turns out GAS does have Win64 EH directives. (It also supports WinCE EH.) Make
...
ours compatible with GAS.
In retrospect, I should have emailed binutils about this earlier. Thanks to
Kai Tietz for pointing out that GAS already had SEH directives.
llvm-svn: 131652
2011-05-19 17:46:39 +00:00
Charles Davis
b4222589bf
Implement the StartChained and EndChained Win64 EH methods on MCStreamer.
...
llvm-svn: 131629
2011-05-19 04:04:13 +00:00
Francois Pichet
68610c1673
Fix the MSVC build.
...
Use a set of overloaded functions instead of template function for CreatePassFn.
It seems that template deduction for functions type that differs only by return type doesn't work with MSVC.
llvm-svn: 131624
2011-05-19 02:54:11 +00:00
Charles Davis
d991ec4e68
Implement the StartProc and EndProc Win64 EH methods on the base MCStreamer.
...
Based largely on Rafael Espindola's work on CFI. Other methods soon to follow.
llvm-svn: 131623
2011-05-19 02:49:00 +00:00
Charles Davis
382c065822
Fix build issues with headers, which I discovered by actually using them.
...
Also, convert all the inline functions on UnwindInfo into methods.
llvm-svn: 131622
2011-05-19 02:47:23 +00:00
Charles Davis
bd5a09d3b2
Add a header patterned after MCDwarf.h for supporting Win64 exception handling
...
under MC.
llvm-svn: 131593
2011-05-18 22:48:24 +00:00
David Chisnall
cb2c7d9186
Some better type safety enforcement in the standard pass list, along with some small tidies and some fixes for bugs that the stricter checking found.
...
llvm-svn: 131592
2011-05-18 22:46:02 +00:00
Eli Friedman
fadb03d6cc
Third pass at allowing plugins to modify default passes. This time with a tweak so that we don't depend on an uninitialized argument.
...
llvm-svn: 131581
2011-05-18 21:40:04 +00:00
Devang Patel
699c973391
Set debug location while setting insertion point.
...
llvm-svn: 131575
2011-05-18 20:58:47 +00:00
Charles Davis
77e0610d7c
Add some more Win64 EH directives:
...
- StartChained and EndChained delimit a chained unwind area, which can contain
additional operations to be undone if an exception occurs inside of it.
- UnwindOnly declares that this function doesn't handle any exceptions. If it
has a handler, it's an unwind handler instead of an exception handler.
- Lsda declares the location and size of the LSDA, which in the Win64 EH
scheme is kept inside the UNWIND_INFO struct. Windows itself ignores the
LSDA; it's used by the Language-Specific Handler (the "Personality Function"
from DWARF).
llvm-svn: 131572
2011-05-18 20:54:10 +00:00
Eli Friedman
65816ac54d
Revert r131556; it's breaking buildbots/clang tests.
...
llvm-svn: 131567
2011-05-18 20:39:27 +00:00
David Chisnall
13c90786e1
Second pass at allowing plugins to modify default passes. This time without bonus inter-library dependencies.
...
llvm-svn: 131556
2011-05-18 19:00:41 +00:00
Duncan Sands
3d9407f4eb
Revert commit 131534 since it seems to have broken several buildbots.
...
Original log entry:
Refactor getActionType and getTypeToTransformTo ; place all of the 'decision'
code in one place.
llvm-svn: 131536
2011-05-18 14:57:56 +00:00
Nadav Rotem
c5c27ede55
Refactor getActionType and getTypeToTransformTo ; place all of the 'decision'
...
code in one place.
llvm-svn: 131534
2011-05-18 12:26:38 +00:00
Charles Davis
384041d0dc
While thinking about how to know where the functions' boundaries are for
...
the purposes of the Win64 EH tables, I realized we had no way to tell where
the function ends. (MASM bounds functions with PROC and ENDP keywords.)
Add a directive to delimit the end of the function, and rename the 'frame'
directive to more accurately reflect its duality with the new directive.
llvm-svn: 131522
2011-05-18 04:47:22 +00:00
Bill Wendling
0671ba8448
Conditionalize the format of the GCOV files by target type. Darwin uses the 4.2
...
format.
llvm-svn: 131503
2011-05-17 23:05:13 +00:00
Jim Grosbach
4f51873f22
Frame indices are signed. Update MachineOperand methods accordingly.
...
llvm-svn: 131475
2011-05-17 18:29:21 +00:00
Jakob Stoklund Olesen
4edf17d91f
Teach LiveInterval::isZeroLength about null SlotIndexes.
...
When instructions are deleted, they leave tombstone SlotIndex entries.
The isZeroLength method should ignore these null indexes.
This causes RABasic to sometimes spill a callee-saved register in the
abi-isel.ll test, so don't run that test with -regalloc=basic. Prioritizing
register allocation according to spill weight can cause more registers to be
used.
llvm-svn: 131436
2011-05-16 23:50:05 +00:00
Dan Gohman
d282f46c6b
Delete unused variables.
...
llvm-svn: 131430
2011-05-16 22:19:54 +00:00
Charles Davis
2701815ed8
Add a method I forgot in the last commit. Don't worry, this one passed
...
self-host :).
llvm-svn: 131421
2011-05-16 21:13:58 +00:00
Eli Friedman
a4d4a0162d
Make fast-isel work correctly s/uadd.with.overflow intrinsics.
...
llvm-svn: 131420
2011-05-16 21:06:17 +00:00
Eli Friedman
9ac944774f
Basic fast-isel of extractvalue. Not too helpful on its own, given the IR clang generates for cases like this, but it should become more useful soon.
...
llvm-svn: 131417
2011-05-16 20:27:46 +00:00
Rafael Espindola
e90c1cb221
sets bit 0 of the function address of thumb function in .symtab
...
("T is 1 if the target symbol S has type STT_FUNC and the
symbol addresses a Thumb instruction ;it is 0 otherwise."
from "ELF for the ARM Architecture" 4.7.1.2)
Patch by Koan-Sin Tan!
llvm-svn: 131406
2011-05-16 16:17:21 +00:00
Zhongxing Xu
56cf054a35
Remove redundant template partial specilization.
...
llvm-svn: 131402
2011-05-16 12:42:22 +00:00
Rafael Espindola
2050af838d
Don't do tail calls in a function that call setjmp. The stack might be
...
corrupted when setjmp returns again.
llvm-svn: 131399
2011-05-16 03:05:33 +00:00
Charles Davis
af18d07ed6
Add stub methods to MCStreamer for emitting Win64 exception-handling
...
information.
llvm-svn: 131382
2011-05-15 17:20:01 +00:00