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
Chris Lattner [Tue, 1 Apr 2008 00:54:39 +0000 (00:54 +0000)]
update comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49010
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 00:53:25 +0000 (00:53 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49009
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Apr 2008 00:35:55 +0000 (00:35 +0000)]
remove DEFINING_FILE_FOR for MappedFile.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49008
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Mon, 31 Mar 2008 23:40:23 +0000 (23:40 +0000)]
Emit exception handling info for functions which are
not marked nounwind, or for all functions when -enable-eh
is set, provided the target supports Dwarf EH.
llvm-gcc generates nounwind in the right places; other FEs
will need to do so also. Given such a FE, -enable-eh should
no longer be needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49006
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Mon, 31 Mar 2008 23:20:09 +0000 (23:20 +0000)]
Mark functions in some tests as 'nounwind'. Generating
EH info for these functions causes the tests to fail for
random reasons (e.g. looking for 'or' or counting lines
with asm-printer; labels count as lines.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49003
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 31 Mar 2008 23:19:51 +0000 (23:19 +0000)]
It's not safe to fold a load from GV stub or constantpool into a two-address use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49002
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Mon, 31 Mar 2008 22:19:25 +0000 (22:19 +0000)]
Actually disable crash reporting on Mac OS X, returning bugpoint to speedy
crash miscompilations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49000
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 31 Mar 2008 22:08:00 +0000 (22:08 +0000)]
Set blockBegin to point to the beginning of the block,
not the end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48999
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 31 Mar 2008 20:40:39 +0000 (20:40 +0000)]
Move reMaterialize() from TargetRegisterInfo to TargetInstrInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48995
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 31 Mar 2008 20:32:52 +0000 (20:32 +0000)]
Fix a DAGCombiner optimization to respect volatile qualification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48994
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Mon, 31 Mar 2008 17:27:57 +0000 (17:27 +0000)]
Add a unified 'generated documentation' target so the web site script has a consistent target to use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48985
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Mon, 31 Mar 2008 17:09:58 +0000 (17:09 +0000)]
test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48984
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Mon, 31 Mar 2008 16:46:23 +0000 (16:46 +0000)]
Reverting r48974. See PR2183 for details.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48983
91177308-0d34-0410-b5e6-
96231b3b80d8
Erick Tryzelaar [Mon, 31 Mar 2008 16:22:09 +0000 (16:22 +0000)]
Expose Function::viewCFG and Function::viewCFGOnly to bindings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48982
91177308-0d34-0410-b5e6-
96231b3b80d8
Erick Tryzelaar [Mon, 31 Mar 2008 08:50:45 +0000 (08:50 +0000)]
There isn't any c++ code in LangImpl8.html, so use that
instead of OCamlLangImpl8.html.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48979
91177308-0d34-0410-b5e6-
96231b3b80d8
Erick Tryzelaar [Mon, 31 Mar 2008 08:44:50 +0000 (08:44 +0000)]
Chapter 5, 6, and 7 of the ocaml/kaleidoscope tutorial
and fix some tabs in chapter 3 and 4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48978
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 31 Mar 2008 07:54:19 +0000 (07:54 +0000)]
Re-apply 48911.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48977
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 31 Mar 2008 07:53:30 +0000 (07:53 +0000)]
The support for remat of instructions with a register operand is hackish, to say the least. Since the register operand guaranteed to be PIC base and that it is already live at all uses, we are making sure it will not be spilled after its uses are rematerialized for both performance and correctness reasons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48976
91177308-0d34-0410-b5e6-
96231b3b80d8
Erick Tryzelaar [Mon, 31 Mar 2008 03:46:43 +0000 (03:46 +0000)]
Quote the ocaml executables
realazthat in #llvm was having problems building llvm
because configure was finding an ocaml executable in
a directory with a space in it's name. This patch
puts quotes around the name so that llvm can build for
him.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48974
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 31 Mar 2008 01:39:20 +0000 (01:39 +0000)]
Fix a major bug in the DFS calculation. Thanks for Christopher Lamb for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48973
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Mon, 31 Mar 2008 00:22:16 +0000 (00:22 +0000)]
Don't eliminate bitcast instructions that change the type of a pointer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48971
91177308-0d34-0410-b5e6-
96231b3b80d8
Erick Tryzelaar [Sun, 30 Mar 2008 20:32:18 +0000 (20:32 +0000)]
Tweak build system to allow for installing the tutorial and uninstalling the docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48968
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 30 Mar 2008 19:38:55 +0000 (19:38 +0000)]
Fix comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48967
91177308-0d34-0410-b5e6-
96231b3b80d8
Erick Tryzelaar [Sun, 30 Mar 2008 19:14:31 +0000 (19:14 +0000)]
Fix some documentation for the tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48966
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 30 Mar 2008 19:07:11 +0000 (19:07 +0000)]
Moved from PR1570.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48965
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 30 Mar 2008 18:58:05 +0000 (18:58 +0000)]
stop building llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48964
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 30 Mar 2008 18:22:13 +0000 (18:22 +0000)]
Fix "Control reaches the end of non-void function" warnings,
patch by David Chisnall.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48963
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 30 Mar 2008 18:02:00 +0000 (18:02 +0000)]
minor code cleanups, allow constant folding sinf/cosf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48961
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 30 Mar 2008 16:59:21 +0000 (16:59 +0000)]
fix typo, PR2181
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48954
91177308-0d34-0410-b5e6-
96231b3b80d8
Erick Tryzelaar [Sun, 30 Mar 2008 09:57:12 +0000 (09:57 +0000)]
Add chapter 3 and 4 of the ocaml/kaleidoscope tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48949
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 29 Mar 2008 18:34:22 +0000 (18:34 +0000)]
Cosmetic changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48947
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 29 Mar 2008 11:25:49 +0000 (11:25 +0000)]
Honour another bunch of parameter attributes in llvm2cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48942
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 29 Mar 2008 11:15:01 +0000 (11:15 +0000)]
Honour ByVal parameter attribute in llvm2cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48941
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Mar 2008 05:15:47 +0000 (05:15 +0000)]
change iterator invalidation avoidance to just move the iterator backward
when something changes, instead of moving forward. This allows us to
simplify memset lowering, inserting the memset at the end of the range of
stuff we're touching instead of at the start.
This, in turn, allows us to make use of the addressing instructions already
used in the function instead of inserting our own. For example, we now
codegen:
%tmp41 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 0 ; <i8*> [#uses=2]
call void @llvm.memset.i64( i8* %tmp41, i8 -1, i64 8, i32 1 )
instead of:
%tmp20 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 7 ; <i8*> [#uses=1]
%ptroffset = getelementptr i8* %tmp20, i64 -7 ; <i8*> [#uses=1]
call void @llvm.memset.i64( i8* %ptroffset, i8 -1, i64 8, i32 1 )
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48940
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Mar 2008 04:52:12 +0000 (04:52 +0000)]
make the common case of a single store (which clearly shouldn't be turned
into a memset!) faster by avoiding an allocation of an std::list node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48939
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Mar 2008 04:51:35 +0000 (04:51 +0000)]
add a testcase for forming memset from noncontiguous stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48938
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Mar 2008 04:36:18 +0000 (04:36 +0000)]
give form-memset a significantly more sane heuristic, enable it by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48937
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sat, 29 Mar 2008 01:58:47 +0000 (01:58 +0000)]
Remove some unneeded code for LiveInterval joining, and fix a bug in the Phi elimination algorithm where we were accidentally reasoning about
the source rather than the destination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48936
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 29 Mar 2008 01:04:05 +0000 (01:04 +0000)]
Cosmetic change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48935
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 28 Mar 2008 23:45:16 +0000 (23:45 +0000)]
Fix a tokenfactor node to use the load chain rather than the
load value. This fixes PR2177.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48932
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 28 Mar 2008 17:49:06 +0000 (17:49 +0000)]
Backing out 48911 for now. It's breaking stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48922
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Mar 2008 15:36:27 +0000 (15:36 +0000)]
ifdef out a dead function. Should this be removed?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48916
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 28 Mar 2008 09:45:24 +0000 (09:45 +0000)]
Rename getAnyLoad to getLoad is suggested by Evan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48914
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 28 Mar 2008 07:07:06 +0000 (07:07 +0000)]
New entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48912
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 28 Mar 2008 06:49:25 +0000 (06:49 +0000)]
Load from stub is already re-materializable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48911
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 28 Mar 2008 06:46:51 +0000 (06:46 +0000)]
Update example to new syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48910
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Mar 2008 06:45:13 +0000 (06:45 +0000)]
make memset inference significantly more powerful: it can now handle
memsets that initialize "structs of arrays" and other store sequences
that are not sequential. This is still only enabled if you pass
-form-memset-from-stores. The flag is not heavily tested and I haven't
analyzed the perf regressions when -form-memset-from-stores is passed
either, but this causes no make check regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48909
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 28 Mar 2008 06:34:23 +0000 (06:34 +0000)]
New entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48908
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 28 Mar 2008 06:22:23 +0000 (06:22 +0000)]
Simplify the conversion from "0x" numbers to a single digit number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48907
91177308-0d34-0410-b5e6-
96231b3b80d8