Owen Anderson [Mon, 7 Apr 2008 17:38:23 +0000 (17:38 +0000)]
Add operator= implementations to SparseBitVector, allowing it to be used in GVN. This results
in both time and memory savings for GVN. For example, one testcase went from 10.5s to 6s with
this patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49345
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 7 Apr 2008 17:03:16 +0000 (17:03 +0000)]
Testcase for pr2169.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49344
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 7 Apr 2008 17:02:18 +0000 (17:02 +0000)]
Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49343
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Mon, 7 Apr 2008 14:20:50 +0000 (14:20 +0000)]
Fix PR 2169.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49339
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 7 Apr 2008 13:45:04 +0000 (13:45 +0000)]
Use Intrinsic::getDeclaration in more places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49338
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 7 Apr 2008 13:43:58 +0000 (13:43 +0000)]
The "stacksave is not nounwind problem" no longer
needs to be fixed here - a previous commit made sure
that intrinsics always get the right attributes.
So remove no-longer needed code, and while there use
Intrinsic::getDeclaration rather than getOrInsertFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49337
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 7 Apr 2008 13:41:19 +0000 (13:41 +0000)]
Use Intrinsic::getDeclaration to get hold of
intrinsics. Fix up the argument type (should
be i8*, was an array*).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49336
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 7 Apr 2008 13:39:11 +0000 (13:39 +0000)]
Make sure that intrinsics automagically get the
right parameter attributes no matter how they
are obtained.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49335
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Levenstein [Mon, 7 Apr 2008 10:06:32 +0000 (10:06 +0000)]
Re-commit of the r48822, where the infinite looping problem discovered
by Dan Gohman is fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49330
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 7 Apr 2008 09:59:07 +0000 (09:59 +0000)]
Make GVN more memory efficient, particularly on code that contains a large number of
allocations, which GVN can't optimize anyways.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49329
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 7 Apr 2008 05:47:52 +0000 (05:47 +0000)]
Remove tabs. Patch by Mike Stump!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49317
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Mon, 7 Apr 2008 00:08:48 +0000 (00:08 +0000)]
Mark calls to llvm.stacksave, llvm.stackrestore as
nounwind. When such calls are inlined into something
else that is invoked, they were getting changed to invokes,
which is badness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49299
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Sun, 6 Apr 2008 23:07:54 +0000 (23:07 +0000)]
regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49293
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Apr 2008 21:50:58 +0000 (21:50 +0000)]
fix warnings with assertions disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49285
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Apr 2008 21:46:45 +0000 (21:46 +0000)]
Silence warning when no assertions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49284
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Apr 2008 21:44:08 +0000 (21:44 +0000)]
silence a warning when assertions are disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49283
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Sun, 6 Apr 2008 21:42:13 +0000 (21:42 +0000)]
fix a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49282
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Apr 2008 21:39:17 +0000 (21:39 +0000)]
fix this testcase to pass and remove a duplicate instance of itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49281
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Sun, 6 Apr 2008 21:23:02 +0000 (21:23 +0000)]
Prefer to expand mask for xor to -1, so we have a chance to turn it into a not.
If it cannot be expanded, it will keep the old behaviour and try to shrink the constant.
Part of enhancement for PR2191.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49280
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Sun, 6 Apr 2008 20:25:17 +0000 (20:25 +0000)]
API changes for class Use size reduction, wave 1.
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Apr 2008 17:38:14 +0000 (17:38 +0000)]
Fix generation of multi-stage instruction itineraries. Patch by
giuma.cordes@gmail.com
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49276
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Sun, 6 Apr 2008 12:42:29 +0000 (12:42 +0000)]
-fPIC is required on x86-64 when building shared objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49274
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Apr 2008 04:12:01 +0000 (04:12 +0000)]
disable this for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49248
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 5 Apr 2008 02:17:58 +0000 (02:17 +0000)]
Forgot this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49247
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 5 Apr 2008 01:27:09 +0000 (01:27 +0000)]
1. IMPLICIT_DEF can *re-define* any register.
2. Coalescer can now create an interesting situation where a register def can
reaches itself without being killed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49246
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 5 Apr 2008 00:30:36 +0000 (00:30 +0000)]
Favors pshufd over shufps when shuffling elements from one vector. pshufd is faster than shufps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49244
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 4 Apr 2008 23:48:31 +0000 (23:48 +0000)]
Make sure both PendingLoads and PendingExports are flushed
before an invoke. Failure to do this causes references in
the landing pad to variables that were not set. Fixes
g++.dg/eh/delayslot1.C
g++.dg/eh/fp-regs.C
g++.old-deja/g++.brendan/eh1.C
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49243
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Fri, 4 Apr 2008 16:08:00 +0000 (16:08 +0000)]
strdup needs <cstring>. This fixes a build error with g++-4.3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49218
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 4 Apr 2008 08:28:13 +0000 (08:28 +0000)]
If a value is cast to its own type, then the cast
is not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49210
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Apr 2008 05:51:42 +0000 (05:51 +0000)]
Provide an initial cut at exposing JIT compiled symbols to performance
tools. This is currently only enabled on the mac, but could easily be
supported by other hosts that are interested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49207
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Apr 2008 04:47:41 +0000 (04:47 +0000)]
Make ExecutionEngine::updateGlobalMapping return the old mapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49206
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 4 Apr 2008 01:20:05 +0000 (01:20 +0000)]
Undo PHI elimination copy placement patch. This causes coalescing (performace) issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49198
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 4 Apr 2008 01:19:03 +0000 (01:19 +0000)]
This is done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49197
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 3 Apr 2008 21:30:06 +0000 (21:30 +0000)]
Reenable running StripSymbols when EH is on.
Dale fixed EH.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49192
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 3 Apr 2008 21:25:03 +0000 (21:25 +0000)]
New test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49190
91177308-0d34-0410-b5e6-
96231b3b80d8
Chuck Rose III [Thu, 3 Apr 2008 20:28:40 +0000 (20:28 +0000)]
Removed a deleted file from the VStudio System project. Also added custom build commands to engage 64 bit assembler for compilation callback on 64 bit configurations only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49188
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 3 Apr 2008 17:37:43 +0000 (17:37 +0000)]
if some functions don't have debug info, we were outputing the same label at the start of each of those functions. This makes assemblers unhappy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49176
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 3 Apr 2008 16:44:37 +0000 (16:44 +0000)]
Add member template version of SerializeTrait<T>::Create that also accepts
an optional argument for us by T's Create method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49169
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 3 Apr 2008 16:41:54 +0000 (16:41 +0000)]
- Turn copies of implicit_def into implicit_def instructions.
- Be smarter about coalescing copies from implicit_def.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49168
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 3 Apr 2008 16:40:27 +0000 (16:40 +0000)]
Special handling of zero-sized live intervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49167
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 3 Apr 2008 16:39:43 +0000 (16:39 +0000)]
- Treat a live range defined by an implicit_def as a zero-sized one.
- Eliminate an implicit_def when it's being spilled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49166
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 3 Apr 2008 16:38:20 +0000 (16:38 +0000)]
- PHI elimination also eliminates implicit_def that fits into a PHI node rather than copying it.
- Be (slightly) smarter about where to place the copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49165
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 3 Apr 2008 16:36:07 +0000 (16:36 +0000)]
Start of a series of patches related to implicit_def.
There is no point in creating a long live range defined by an implicit_def. Scheduler now duplicates implicit_def instruction for each of its uses. Therefore, if an implicit_def node has multiple uses, it will become a number of very short live ranges, rather than a long one. This will make coalescer's job easier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49164
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 3 Apr 2008 16:11:31 +0000 (16:11 +0000)]
Re-implemented Path::createDirectoryOnDisk (for Unix).
This method allows one to create a directory, and optionally create all parent
directories that do not exist.
The original implementation would require that *all* directories along a path
are writable by the user, including directories that already exist. For example,
suppose we wanted to create the directory "/tmp/foo/bar", and the directory
"/tmp" already exists, but not "/tmp/foo". Since "/tmp" is writable by all
users, the original implementation would work, and create "/tmp/foo", followed
by "/tmp/bar".
A problem occurred, however if one wanted to created the directory
"/Users/myuser/bar" (or equivalently "/home/myuser/bar"), and "/Users/myuser"
already existed and is writable by the current user. The directory
"/User/myuser" is writable by the user, but "/User" is not. The original
implementation of createDirectoryOnDisk would return with failure since "/User"
is not writable, even though "/User/mysuser" is writable.
The new implementation works by recursively creating parents as needed, and thus
doesn't need to check the permissions on every directory in a path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49162
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 3 Apr 2008 08:53:29 +0000 (08:53 +0000)]
Re-enable SSE4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49158
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 3 Apr 2008 08:53:17 +0000 (08:53 +0000)]
Fix x86-64 encoding bug. REX prefix must always follow 0x0F prefix. For example, extractps in 64bit mode: 66 REX 0F 3A 17, not 66 0F 3A REX 17.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49157
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 3 Apr 2008 07:45:18 +0000 (07:45 +0000)]
Cosmetic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49156
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 3 Apr 2008 04:49:54 +0000 (04:49 +0000)]
Temporarily disabling SSE4 until we fix the encoding issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49129
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 3 Apr 2008 03:13:16 +0000 (03:13 +0000)]
Backing out 48222 temporarily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49124
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 3 Apr 2008 00:02:49 +0000 (00:02 +0000)]
Move instruction flag inference out of InstrInfoEmitter and into
CodeGenDAGPatterns, where it can be used in other tablegen backends.
This allows the inference to be done for DAGISelEmitter so that it
gets accurate mayLoad/mayStore/isSimpleLoad flags.
This brings MemOperand functionality back to where it was before
48329. However, it doesn't solve the problem of anonymous patterns
which expand to code that does loads or stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49123
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 2 Apr 2008 23:52:49 +0000 (23:52 +0000)]
Suppress the 128-bit integer typedef on 32-bit targets, because
it causes compile errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49122
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 2 Apr 2008 20:16:41 +0000 (20:16 +0000)]
Testcase for EH with functions whose names are stripped.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49111
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 2 Apr 2008 20:10:52 +0000 (20:10 +0000)]
Make EH work with unnamed functions. Reenable running
StripSymbols when EH is on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49110
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 2 Apr 2008 19:40:14 +0000 (19:40 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49109
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 2 Apr 2008 18:24:46 +0000 (18:24 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49106
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 2 Apr 2008 18:04:08 +0000 (18:04 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49105
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 2 Apr 2008 17:23:50 +0000 (17:23 +0000)]
Remove #include<map> from LiveVariables.h. Not referenced.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49099
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 2 Apr 2008 17:04:45 +0000 (17:04 +0000)]
Cosmetic changes per EH patch review feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49096
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Wed, 2 Apr 2008 14:57:52 +0000 (14:57 +0000)]
Add new file Support/DataFlow.h.
It allows Use-Def and Def-Use relations to be treated as graphs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49088
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 2 Apr 2008 05:23:57 +0000 (05:23 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49079
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 2 Apr 2008 03:00:13 +0000 (03:00 +0000)]
In some situations, we need to check for local interferences between the PHI
node and its inputs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49070
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 2 Apr 2008 02:12:45 +0000 (02:12 +0000)]
Correctly mark a valno that was previous defined by a PHI node as having an
unknown defining inst after PHI elimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49069
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 2 Apr 2008 00:38:26 +0000 (00:38 +0000)]
more edits from Jon Sargeant
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49065
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 2 Apr 2008 00:25:04 +0000 (00:25 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49064
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 1 Apr 2008 23:59:29 +0000 (23:59 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49061
91177308-0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Tue, 1 Apr 2008 23:41:44 +0000 (23:41 +0000)]
Reverting 49056 due to the build being broken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49060
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 1 Apr 2008 23:26:12 +0000 (23:26 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49059
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Tue, 1 Apr 2008 22:14:23 +0000 (22:14 +0000)]
Iterators folloring a SmallVector erased element are invalidated so
don't access cached iterators from after the erased element.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49056
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 1 Apr 2008 22:09:20 +0000 (22:09 +0000)]
Fix compilation errors on MSVC. Patch by Argiris Kirtzidis!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49055
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 1 Apr 2008 21:38:20 +0000 (21:38 +0000)]
Remove unnecessary and non-deterministic checking code. Re-enable remat of load from gv stub.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49054
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 1 Apr 2008 21:37:32 +0000 (21:37 +0000)]
Re-materialization is for uses only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49053
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 1 Apr 2008 20:56:18 +0000 (20:56 +0000)]
Don't use __bzero for memset if the second argument isn't zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49050
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 1 Apr 2008 20:38:36 +0000 (20:38 +0000)]
Speculatively micro-optimize memory-zeroing calls on Darwin 10.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49048
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 1 Apr 2008 20:00:57 +0000 (20:00 +0000)]
Revert 49006 for the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49046
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 18:47:32 +0000 (18:47 +0000)]
add a dropped hunk from Jon Sargeant's patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49045
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 18:45:27 +0000 (18:45 +0000)]
make langref more precise, wave 1, from Jon Sargeant
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49044
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 1 Apr 2008 18:05:08 +0000 (18:05 +0000)]
Don't dereference MBB->end().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49043
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 18:04:03 +0000 (18:04 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49041
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 18:02:36 +0000 (18:02 +0000)]
minor typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49040
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 1 Apr 2008 07:33:13 +0000 (07:33 +0000)]
Disabling remat of load from gv stub (temporarily) again to fix llvmgcc bootstrap miscompare.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49037
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 06:25:23 +0000 (06:25 +0000)]
add some #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49036
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 06:20:44 +0000 (06:20 +0000)]
MappedFile is dead, remove it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49035
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 06:16:24 +0000 (06:16 +0000)]
Implement Path::MapInFilePages/UnMapFilePages on unix, which
provides fast MappedFile::getFile for large files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49034
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 06:05:21 +0000 (06:05 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49031
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 06:00:12 +0000 (06:00 +0000)]
Stub out some sys::Path::MapInFilePages/UnMapFilePages methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49030
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 04:26:46 +0000 (04:26 +0000)]
change the archive stuff to use MemoryBuffer instead of mappedfile.
MemoryBuffer is higher level and more closely matches the model
needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49029
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 04:00:45 +0000 (04:00 +0000)]
prune unneeded #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49028
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 03:59:34 +0000 (03:59 +0000)]
rewrite SourceFile to be in terms of MemoryBuffer, not MappedFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49027
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 03:49:38 +0000 (03:49 +0000)]
Make MappedFile::map return a const correct pointer, don't leak address space on Unix platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49026
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 03:40:53 +0000 (03:40 +0000)]
Remove the MappedFile::charBase member, rename base -> getBase() and
make getBase() return a const-correct pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49025
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 03:39:49 +0000 (03:39 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49024
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 03:20:31 +0000 (03:20 +0000)]
add an accessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49023
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 03:10:22 +0000 (03:10 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49022
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 03:01:15 +0000 (03:01 +0000)]
remove extraneous #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49021
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 02:58:05 +0000 (02:58 +0000)]
add missing #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49020
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 1 Apr 2008 02:18:22 +0000 (02:18 +0000)]
More soft fp fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49016
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 1 Apr 2008 02:00:09 +0000 (02:00 +0000)]
Pasto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49014
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 1 Apr 2008 01:51:26 +0000 (01:51 +0000)]
Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49013
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 1 Apr 2008 01:50:16 +0000 (01:50 +0000)]
Unbreak ARM / Thumb soft FP support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49012
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 1 Apr 2008 00:57:48 +0000 (00:57 +0000)]
Accept 'y' constraint (MMX) in inline asm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49011
91177308-0d34-0410-b5e6-
96231b3b80d8