Commit Graph

37971 Commits

Author SHA1 Message Date
Dale Johannesen 491557712a Make EH work with unnamed functions. Reenable running
StripSymbols when EH is on.

llvm-svn: 49110
2008-04-02 20:10:52 +00:00
Dan Gohman 39d8b26322 Partial CBackend support for 128-bit integers. This is needed
now that llvm-gcc is lowering appropriately-sized struct returns
to i128 on x86-64.

llvm-svn: 49109
2008-04-02 19:40:14 +00:00
David Greene 586740f401 Iterators folloring a SmallVector erased element are invalidated so
don't access cached iterators from after the erased element.

Re-apply 49056 with SmallVector support.

llvm-svn: 49106
2008-04-02 18:24:46 +00:00
Evan Cheng d8616064d8 Now that I am told MachineRegisterInfo also tracks physical register uses / defs, I can do away with the horribleness I introduced a while back. It's impossible to detect if there is any use of a physical register below an instruction (and before any def of the register) with some cheap book keeping.
llvm-svn: 49105
2008-04-02 18:04:08 +00:00
Evan Cheng be3d44c3cb Remove #include<map> from LiveVariables.h. Not referenced.
llvm-svn: 49099
2008-04-02 17:23:50 +00:00
Dale Johannesen 8780ecbbac Cosmetic changes per EH patch review feedback.
llvm-svn: 49096
2008-04-02 17:04:45 +00:00
Torok Edwin 21b8bed571 Add new file Support/DataFlow.h.
It allows Use-Def and Def-Use relations to be treated as graphs.

llvm-svn: 49088
2008-04-02 14:57:52 +00:00
Anton Korobeynikov 20c9e4cbee Add new CC lowering rule: provide a list of registers, which can be 'shadowed',
when some another register is used for argument passing.
Currently is used on Win64.

llvm-svn: 49079
2008-04-02 05:23:57 +00:00
Owen Anderson 2412158111 In some situations, we need to check for local interferences between the PHI
node and its inputs.

llvm-svn: 49070
2008-04-02 03:00:13 +00:00
Owen Anderson edfc2eb558 Correctly mark a valno that was previous defined by a PHI node as having an
unknown defining inst after PHI elimination.

llvm-svn: 49069
2008-04-02 02:12:45 +00:00
Chris Lattner 1f17cce2eb more edits from Jon Sargeant
llvm-svn: 49065
2008-04-02 00:38:26 +00:00
Dale Johannesen fd967cf3fa Recommitting EH patch; this should answer most of the
review feedback.
-enable-eh is still accepted but doesn't do anything.
EH intrinsics use Dwarf EH if the target supports that,
and are handled by LowerInvoke otherwise.
The separation of the EH table and frame move data is,
I think, logically figured out, but either one still
causes full EH info to be generated (not sure how to
split the metadata correctly).
MachineModuleInfo::needsFrameInfo is no longer used and
is removed.

llvm-svn: 49064
2008-04-02 00:25:04 +00:00
Evan Cheng ac38d444e2 1. Drop default inline threshold back down to 200.
2. Do not use # of basic blocks as part of the cost computation since it doesn't really figure into function size.
3. More aggressively inline function with vector code.

llvm-svn: 49061
2008-04-01 23:59:29 +00:00
Tanya Lattner 052838c55d Reverting 49056 due to the build being broken.
llvm-svn: 49060
2008-04-01 23:41:44 +00:00
Evan Cheng b86595fb0a ReMat of load from stub in pic mode extends the life of pic base. Currently spiller doesn't do a good job of estimating the impact. Disable for now.
llvm-svn: 49059
2008-04-01 23:26:12 +00:00
David Greene 7f7edc3824 Iterators folloring a SmallVector erased element are invalidated so
don't access cached iterators from after the erased element.

llvm-svn: 49056
2008-04-01 22:14:23 +00:00
Bill Wendling fc9f25dab0 Fix compilation errors on MSVC. Patch by Argiris Kirtzidis!
llvm-svn: 49055
2008-04-01 22:09:20 +00:00
Evan Cheng 19a6dd9f2a Remove unnecessary and non-deterministic checking code. Re-enable remat of load from gv stub.
llvm-svn: 49054
2008-04-01 21:38:20 +00:00
Evan Cheng 985a0b51d7 Re-materialization is for uses only.
llvm-svn: 49053
2008-04-01 21:37:32 +00:00
Dan Gohman cb9f8f6e4e Don't use __bzero for memset if the second argument isn't zero.
llvm-svn: 49050
2008-04-01 20:56:18 +00:00
Dan Gohman 980d7200c1 Speculatively micro-optimize memory-zeroing calls on Darwin 10.
llvm-svn: 49048
2008-04-01 20:38:36 +00:00
Dale Johannesen 5e4e051c2a Revert 49006 for the moment.
llvm-svn: 49046
2008-04-01 20:00:57 +00:00
Chris Lattner 81f929763c add a dropped hunk from Jon Sargeant's patch.
llvm-svn: 49045
2008-04-01 18:47:32 +00:00
Chris Lattner 1429e6fb29 make langref more precise, wave 1, from Jon Sargeant
llvm-svn: 49044
2008-04-01 18:45:27 +00:00
Owen Anderson 49dd9f16a9 Don't dereference MBB->end().
llvm-svn: 49043
2008-04-01 18:05:08 +00:00
Chris Lattner 6f2ffdb73f Change the MemoryBuffer::getFile* methods to take just a pointer to the
start of a filename, not a filename+length.  All clients can produce a
null terminated name, and the system api's require null terminated 
strings anyway.

llvm-svn: 49041
2008-04-01 18:04:03 +00:00
Chris Lattner 5db870c904 minor typo
llvm-svn: 49040
2008-04-01 18:02:36 +00:00
Evan Cheng 306e3dcff4 Disabling remat of load from gv stub (temporarily) again to fix llvmgcc bootstrap miscompare.
llvm-svn: 49037
2008-04-01 07:33:13 +00:00
Chris Lattner ba98fca5e5 add some #includes.
llvm-svn: 49036
2008-04-01 06:25:23 +00:00
Chris Lattner 18356d8857 MappedFile is dead, remove it.
llvm-svn: 49035
2008-04-01 06:20:44 +00:00
Chris Lattner 4c5e15f7da Implement Path::MapInFilePages/UnMapFilePages on unix, which
provides fast MappedFile::getFile for large files.

llvm-svn: 49034
2008-04-01 06:16:24 +00:00
Chris Lattner a542518315 Reimplement MemoryBuffer::getFile with three enhancements:
1) stop using MappedFile.
2) if profitable use the sys::path::MapInFilePages api to
   read the file.
3) otherwise fallback to read.

When sys::path::MapInFilePages is implemented, this provides
several benefits:

#1: this avoids fragmenting memory for small files.
#2: this avoids extraneous stat calls when the file size is known.
#3: this only keeps the file descriptor open while reading the 
    file, not for the duration of the lifetime of the memory 
    buffer.  This fixes a serious clang FD 'leak' problem.

I believe that this will work on a win32 machine, but I don't have
one to test on.  I'd appreciate it if someone could check.

llvm-svn: 49031
2008-04-01 06:05:21 +00:00
Chris Lattner 3089e1d82e Stub out some sys::Path::MapInFilePages/UnMapFilePages methods.
llvm-svn: 49030
2008-04-01 06:00:12 +00:00
Chris Lattner d4310a27aa change the archive stuff to use MemoryBuffer instead of mappedfile.
MemoryBuffer is higher level and more closely matches the model
needed.

llvm-svn: 49029
2008-04-01 04:26:46 +00:00
Chris Lattner 014dea94b2 prune unneeded #includes
llvm-svn: 49028
2008-04-01 04:00:45 +00:00
Chris Lattner 4ac7bb0294 rewrite SourceFile to be in terms of MemoryBuffer, not MappedFile.
llvm-svn: 49027
2008-04-01 03:59:34 +00:00
Chris Lattner 64959dcf03 Make MappedFile::map return a const correct pointer, don't leak address space on Unix platforms.
llvm-svn: 49026
2008-04-01 03:49:38 +00:00
Chris Lattner bcfa564759 Remove the MappedFile::charBase member, rename base -> getBase() and
make getBase() return a const-correct pointer.

llvm-svn: 49025
2008-04-01 03:40:53 +00:00
Chris Lattner 314a1414d0 Change DiffFilesWithTolerance to be written in terms of MemoryBuffer,
not an mmapped file.  This more closely matches its requirements and
provides an implicitly null terminated buffer, something this
routine had to emulate itself before.

llvm-svn: 49024
2008-04-01 03:39:49 +00:00
Chris Lattner 5a7d4e4f6d add an accessor.
llvm-svn: 49023
2008-04-01 03:20:31 +00:00
Chris Lattner 62385ba3a0 Remove MappedFile support for mapping files for write and exec
and shared.  This complicates the design, is not used, and probably
doesn't even work.

llvm-svn: 49022
2008-04-01 03:10:22 +00:00
Chris Lattner f5b0b76d28 remove extraneous #include
llvm-svn: 49021
2008-04-01 03:01:15 +00:00
Chris Lattner 3d7127b3e3 add missing #includes
llvm-svn: 49020
2008-04-01 02:58:05 +00:00
Evan Cheng 0bd72c5ccd More soft fp fixes.
llvm-svn: 49016
2008-04-01 02:18:22 +00:00
Evan Cheng 4cabe4b452 Pasto.
llvm-svn: 49014
2008-04-01 02:00:09 +00:00
Evan Cheng 611abc03ed Add comment.
llvm-svn: 49013
2008-04-01 01:51:26 +00:00
Evan Cheng 86e476b7cb Unbreak ARM / Thumb soft FP support.
llvm-svn: 49012
2008-04-01 01:50:16 +00:00
Dale Johannesen efa81a6979 Accept 'y' constraint (MMX) in inline asm.
llvm-svn: 49011
2008-04-01 00:57:48 +00:00
Chris Lattner ac17d39469 update comment.
llvm-svn: 49010
2008-04-01 00:54:39 +00:00
Chris Lattner efecfbc113 cleanup the MappedFile API and comments. This removes and updates
tons of out of date comments (really nothing throws here!) and fixes
some other fairly glaring issues: "size" used to return the size of 
the file *and* change it, depending on how you called it.

llvm-svn: 49009
2008-04-01 00:53:25 +00:00