John Criswell [Mon, 25 Oct 2004 18:41:50 +0000 (18:41 +0000)]
Removed dead method, printPHICopiesForSuccessors().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17216
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 Oct 2004 18:40:47 +0000 (18:40 +0000)]
Patch to support MSVC better, contributed by Morten Ofstad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17215
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 Oct 2004 18:40:08 +0000 (18:40 +0000)]
Patch to support MSVC, contributed by Morten Ofstad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17214
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 Oct 2004 18:38:05 +0000 (18:38 +0000)]
Patch to support MSVC correctly, contributed by Morten Ofstad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17213
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Mon, 25 Oct 2004 18:30:09 +0000 (18:30 +0000)]
Modified switch generation so that only the phi values associated with the
destination basic block are copied.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17212
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 25 Oct 2004 08:27:37 +0000 (08:27 +0000)]
New Makefile Features:
* "dist" target now builds tar.gz, tar.bz2, and zip files suitable for
distribution. "dist" can only be run from $(BUILD_OBJ_ROOT) and implies
a "check".
* made the preconditions not do a recursive make and ensured that they are
executed sequentially.
* made the messages output by the makefile be prefixed with "llvm" and the
make level (e.g. llvm[1]: ) in the same way that make does so that the
messages are uniform and more readable.
* Fixed the tags target so that tags depends on TAGS which contains the
rules to build a file named TAGS
* Implemented the EXTRA_DIST feature in a few directories to make sure it
works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17210
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 25 Oct 2004 08:21:09 +0000 (08:21 +0000)]
Teach mkinstalldirs how to shut up about making directories.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17209
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 25 Oct 2004 08:18:47 +0000 (08:18 +0000)]
Add a check for the tar program.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17208
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sun, 24 Oct 2004 10:33:30 +0000 (10:33 +0000)]
Implement more complete and correct codegen for bitfield inserts, as tested
by the recently committed rlwimi.ll test file. Also commit initial code
for bitfield extract, although it is turned off until fully debugged.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17207
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sun, 24 Oct 2004 10:30:22 +0000 (10:30 +0000)]
Initial checkin of regression test for generating the PowerPC rlwimi
instruction, which performs bitfield inserts. All tests should compile
to one rlwimi instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17206
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 24 Oct 2004 08:48:59 +0000 (08:48 +0000)]
First draft. More to come.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17205
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 24 Oct 2004 08:21:04 +0000 (08:21 +0000)]
Fix uninstall from rebuilding everything (wrong dependency)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17204
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 24 Oct 2004 08:20:10 +0000 (08:20 +0000)]
Move top level rules for tags and installing headers to Makefile.rules
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17203
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 24 Oct 2004 07:53:21 +0000 (07:53 +0000)]
Implemented New Features:
* Fixed the install target to install files correctly
* Implemented the uninstall target to remove files from install dirs
* Isolated the top level targets (dist, dist-check, dist-clean, tags) so
they only run/exist from the top level directory
* Put if/endif gaurds around potentially dangerous $(RM) commands.
* Implemented place-holder rules for distribution targets to just say that
they aren't implemented yet.
* Implemented tags target in Makefile.rules so all projects can use it
* Made a pony for resistor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17202
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 24 Oct 2004 04:27:59 +0000 (04:27 +0000)]
Fix the previous bug the correct way. This fixes ptrdist/bc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17201
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Sun, 24 Oct 2004 03:18:30 +0000 (03:18 +0000)]
Fix grammar in comments to getSizeOf()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17200
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Sun, 24 Oct 2004 03:02:16 +0000 (03:02 +0000)]
Make this actually work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17199
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Sun, 24 Oct 2004 03:01:32 +0000 (03:01 +0000)]
Improve comments and wrap to 80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17198
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 24 Oct 2004 02:26:09 +0000 (02:26 +0000)]
Make the $(OBJDIR) go away on clean-local.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17197
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Sun, 24 Oct 2004 01:41:10 +0000 (01:41 +0000)]
Add ConstantExpr::getSizeOf(Type*).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17196
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Sat, 23 Oct 2004 23:47:34 +0000 (23:47 +0000)]
* Correctly handle the MovePCtoLR pseudo-instr with a bl to next instr
* Stop the confusion of using rv and Addr for global addresses: just use rv
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17195
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Sat, 23 Oct 2004 20:29:24 +0000 (20:29 +0000)]
Add BA, BL, and BLA opcodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17193
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 23 Oct 2004 20:04:14 +0000 (20:04 +0000)]
Several Changes:
* Fix parallel build problem on generated dependency files
* Fix rule confusion between .a and .la libraries so that parallel builds
don't get confused on who is building which .o and which library it is
going into.
* Fix dependency inclusion to only include C/C++ dependency files because
other types of sources won't have dependencies auto generated.
* Change "Source" to "SOURCES" for naming consistency
* Update parallel build rules for new recursive targets
* Implement EXPERIMENTAL_DIRS (failure allowed) feature
* Implement -local version of targets (all-local, clean-local, etc)
* Implement recursive targets in terms of their local counterparts
* Clarify names of some internal variables
* Move documentation to docs/MakefileGuide.html
* Clean up commentary
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17192
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 23 Oct 2004 19:49:20 +0000 (19:49 +0000)]
Make clean quieter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17191
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Sat, 23 Oct 2004 18:28:01 +0000 (18:28 +0000)]
* Do not emit IMPLICIT_DEF pseudo-instructions
* Convert register numbers from their opcode value to the real value, e.g.
PPC::R1 => 1 and PPC::F1 => 1
* Add correct handling of loading of global values which are PC-relative --
implement ha16() and lo16()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17190
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 23 Oct 2004 15:30:30 +0000 (15:30 +0000)]
Fix nightly build by avoiding shared library construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17187
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 23 Oct 2004 08:19:37 +0000 (08:19 +0000)]
* Actually ignore build errors in optional directories
* Use LLVM_SRC_ROOT as the anchor for the Target.td file
* Use MFLAGS instead of MAKEFLAGS for recursive makes so we don't try
to build a target "w" or "s" mysteriously.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17186
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 23 Oct 2004 08:01:27 +0000 (08:01 +0000)]
Remove the clean target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17185
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 23 Oct 2004 07:57:22 +0000 (07:57 +0000)]
First cut at the LLVM Makefile Guide. There's lots to correct and lots more
to write, but this is all my brain can muster for tonight.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17184
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Sat, 23 Oct 2004 06:08:38 +0000 (06:08 +0000)]
DForm_1, particularly used by store instructions, needs the immediate operand to
be listed second as that is how the instructions are usually created (and is the
correct asm syntax) so that it's assembled correctly from its constituents
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17183
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Sat, 23 Oct 2004 06:05:49 +0000 (06:05 +0000)]
Fix the SPR field for MTLR, MFLR, MTCTR, and MFCTR instructions.
The decimal value given in the manual (8 or 9) really needs to be multiplied by
a factor of 32 because of the group of 5 zero bits after the register code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17182
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Sat, 23 Oct 2004 05:38:55 +0000 (05:38 +0000)]
The value of the XO field for MFLR and MFCTR is 339, not 399
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17181
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Sat, 23 Oct 2004 04:59:22 +0000 (04:59 +0000)]
Remove extraneous blank line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17180
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 23 Oct 2004 04:58:50 +0000 (04:58 +0000)]
Make VC happier, patch contributed by Morten Ofstad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17179
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Sat, 23 Oct 2004 04:58:32 +0000 (04:58 +0000)]
Align function arguments in function headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17178
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 23 Oct 2004 03:10:23 +0000 (03:10 +0000)]
Fix a bug that Brian brought to my attention. This corrects:
Assembler/2004-10-22-BCWriterUndefBug.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17177
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 23 Oct 2004 03:10:01 +0000 (03:10 +0000)]
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17176
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sat, 23 Oct 2004 00:50:23 +0000 (00:50 +0000)]
Kill casts from integer types to unsigned byte, when the cast was only used
as the shift amount operand to a shift instruction. This was causing us to
emit unnecessary clear operations for code such as:
int foo(int x) { return 1 << x; }
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17175
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 22 Oct 2004 23:35:57 +0000 (23:35 +0000)]
Use cleaner quoting and eliminate blank space
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17174
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Fri, 22 Oct 2004 23:24:39 +0000 (23:24 +0000)]
Clean up the output from this makefile so its not verbose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17173
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Fri, 22 Oct 2004 23:06:30 +0000 (23:06 +0000)]
Make sure that we don't set up a circular dependency if OBJDIR == SRCDIR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17172
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Fri, 22 Oct 2004 23:05:46 +0000 (23:05 +0000)]
Remove double colon rule for gram.tab.h so it doesn't conflict with the
auto-generated dependency rule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17171
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 22 Oct 2004 22:18:27 +0000 (22:18 +0000)]
Pull in Target.td using absolute path from source root instead of relative path;
this allows us to have sub-targets whose depth in the tree is not the same as it
is for the standard X86/PowerPC/Sparc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17170
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 22 Oct 2004 22:16:24 +0000 (22:16 +0000)]
Adjust rules for building .inc files due to Reid's changes of Makefile.rules
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17169
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Fri, 22 Oct 2004 21:02:23 +0000 (21:02 +0000)]
We're not doing automake any more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17168
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Fri, 22 Oct 2004 21:02:08 +0000 (21:02 +0000)]
Adjust to changes in Makefile.rules
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17167
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Fri, 22 Oct 2004 21:01:56 +0000 (21:01 +0000)]
Shorten the rules, speed it up, correct library contruction, add *.td rules
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17166
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Fri, 22 Oct 2004 21:01:44 +0000 (21:01 +0000)]
Remove the unused SourceDir variable (use BUILD_SRC_DIR)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17165
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Fri, 22 Oct 2004 19:33:22 +0000 (19:33 +0000)]
One more file to remove now that we're not doing automake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17164
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Fri, 22 Oct 2004 16:10:39 +0000 (16:10 +0000)]
Eliminate compilation warning on uninitialized variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17163
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 22 Oct 2004 06:43:28 +0000 (06:43 +0000)]
*** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17161
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 22 Oct 2004 06:43:07 +0000 (06:43 +0000)]
New testcase. Check for the ability to promote a malloc whose initialzed state is checked by the program
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17160
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 22 Oct 2004 04:53:16 +0000 (04:53 +0000)]
Fix a bug Nate noticed, where we miscompiled a simple testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17157
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Fri, 22 Oct 2004 03:39:08 +0000 (03:39 +0000)]
Remove automake support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17156
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Fri, 22 Oct 2004 03:35:04 +0000 (03:35 +0000)]
We won't use automake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17155
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Thu, 21 Oct 2004 03:07:38 +0000 (03:07 +0000)]
Remove debug code emitter from the JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17151
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Thu, 21 Oct 2004 02:44:16 +0000 (02:44 +0000)]
Make this compile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17150
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Thu, 21 Oct 2004 01:42:02 +0000 (01:42 +0000)]
* Added basic support for JITing functions, basic blocks, instruction encoding,
including registers, constants, and partial support for global addresses
* The JIT is disabled by default to allow building llvm-gcc, which wants to test
running programs during configure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17149
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 20 Oct 2004 21:55:41 +0000 (21:55 +0000)]
Don't clear or sign extend bool->int. This fires a few dozen times on the test suite
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17147
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Wed, 20 Oct 2004 19:38:58 +0000 (19:38 +0000)]
Explain what this pass does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17146
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Wed, 20 Oct 2004 14:38:39 +0000 (14:38 +0000)]
Small performance improvement in generated C code:
Instead of unconditionally copying all phi node values into temporaries for
all successor blocks, generate code that will determine what successor
block will be called and then copy only those phi node values needed by
the successor block.
This seems to cut down namd execution time from being 8% higher than GCC to
4% higher than GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17144
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 19 Oct 2004 19:49:42 +0000 (19:49 +0000)]
* Add baseline structural JIT code, but disable the JIT to allow llvm-gcc builds
- Support added for functions, basic blocks, constant pool, constants,
registers, and some basic support for globals, all untested
* Turn assert()s into abort()s so that unimplemented functions fail in release
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17143
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Oct 2004 06:33:16 +0000 (06:33 +0000)]
Hrm, some people complain when the compiler cheerfully tells them what it's
doing... I guess they're right.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17142
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 19 Oct 2004 05:55:54 +0000 (05:55 +0000)]
Fix some grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17141
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 19 Oct 2004 05:50:34 +0000 (05:50 +0000)]
If we're going to make the braces of functions line up for ease of readability
and aesthetic reasons, might as well finish the job
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17140
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 19 Oct 2004 05:49:46 +0000 (05:49 +0000)]
Remove unnecessary spaces in function signature
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17139
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 19 Oct 2004 05:15:21 +0000 (05:15 +0000)]
Simplify mapping info generation. In particular, the LLVM-to-MachineInstr map
is no longer emitted, and we do not reference any MachineCodeForInstruction
information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17138
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 19 Oct 2004 00:29:16 +0000 (00:29 +0000)]
* Fit constructor initializer on a single line
* Delete blank chars at end of line to fit into 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17137
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 18 Oct 2004 23:55:41 +0000 (23:55 +0000)]
Initial automake generated Makefile template
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17136
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 18 Oct 2004 22:14:48 +0000 (22:14 +0000)]
Move code to redefine INT64_{MIN,MAX} on AIX/PowerPC to a separate header,
because #undef becomes commented out in DataTypes.h.in due to autoheader
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17135
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Mon, 18 Oct 2004 21:08:22 +0000 (21:08 +0000)]
Initial implementation of the strength reduction for GEP instructions in
loops. This optimization is not turned on by default yet, but may be run
with the opt tool's -loop-reduce flag. There are many FIXMEs listed in the
code that will make it far more applicable to a wide range of code, but you
have to start somewhere :)
This limited version currently triggers on the following tests in the
MultiSource directory:
pcompress2: 7 times
cfrac: 5 times
anagram: 2 times
ks: 6 times
yacr2: 2 times
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17134
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 18 Oct 2004 18:35:21 +0000 (18:35 +0000)]
* AIX on Power defines INT64_MIN and INT64_MAX in ways that annoy GCC, so
special-case those definitions
* Add comments in #ifdef/#else/#endif clauses for ease of reading
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17132
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 18 Oct 2004 17:39:45 +0000 (17:39 +0000)]
AIX does not have mkdtemp() so emulate its behavior using mktemp() and mkdir()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17131
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Oct 2004 17:19:20 +0000 (17:19 +0000)]
Fix miscompilations in the SparcV9 backend that were induced by this patch:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-
20041011/019311.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17130
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Oct 2004 15:54:17 +0000 (15:54 +0000)]
Improve compatibility with VC++, patch contributed by Morten Ofstad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17126
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Oct 2004 15:43:46 +0000 (15:43 +0000)]
Get this file compiling with VC++, patch contributed by Morten Ofstad. Thanks Morten!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17125
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 18 Oct 2004 14:43:45 +0000 (14:43 +0000)]
Declare a function in the correct namespace.
Patch contributed by Morten Ofstad. Thanks Morten!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17124
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 18 Oct 2004 14:38:48 +0000 (14:38 +0000)]
Correction to allow compilation with Visual C++.
Patch contributed by Morten Ofstad. Thanks Morten!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17123
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Oct 2004 04:07:22 +0000 (04:07 +0000)]
Simplify code by deleting instructions that preceed unreachable instructions.
Simplify code by simplifying terminators that branch to blocks that start
with an unreachable instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17116
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Oct 2004 04:06:41 +0000 (04:06 +0000)]
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17115
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 18 Oct 2004 03:32:12 +0000 (03:32 +0000)]
Actually link all the analysis passes and their dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17114
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 18 Oct 2004 03:26:21 +0000 (03:26 +0000)]
Remove extra comma.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17113
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 18 Oct 2004 03:22:48 +0000 (03:22 +0000)]
Actually link in all the analysis passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17112
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Oct 2004 03:00:50 +0000 (03:00 +0000)]
Turn store -> null/undef into the LLVM unreachable instruction! This simple
change hacks off 10K of bytecode from perlbmk (.5%) even though the front-end
is not generating them yet and we are not optimizing the resultant code.
This isn't too bad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17111
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Oct 2004 02:59:09 +0000 (02:59 +0000)]
Turn things with obviously undefined semantics into 'store -> null'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17110
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Oct 2004 01:48:31 +0000 (01:48 +0000)]
My friend the invoke instruction does not dominate all basic blocks if it
occurs in the entry node of a function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17109
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Oct 2004 01:21:17 +0000 (01:21 +0000)]
Fix a bug that occurs when the constant value is the result of an invoke. In
particular, invoke ret values are only live in the normal dest of the invoke
not in the unwind dest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17108
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 17 Oct 2004 23:49:11 +0000 (23:49 +0000)]
Print a semicolon for the unreacahble instruction. This fixes problems
where C requires semicolons in some cases to indicate null statements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17107
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 17 Oct 2004 23:45:06 +0000 (23:45 +0000)]
Getting ADCE to interact well with unreachable instructions seems like a nontrivial
exercise that I'm not interested in tackling right now. Just punt and treat them
like unwind's.
This 'fixes' test/Regression/Transforms/ADCE/unreachable-function.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17106
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 17 Oct 2004 23:44:02 +0000 (23:44 +0000)]
New testcase that ADCE shouldn't crash on
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17105
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 17 Oct 2004 23:21:07 +0000 (23:21 +0000)]
Fix Regression/Transforms/Inline/2004-10-17-InlineFunctionWithoutReturn.ll
If a function had no return instruction in it, and the result of the inlined
call instruction was used, we would crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17104
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 17 Oct 2004 23:20:29 +0000 (23:20 +0000)]
New testcase that crashes the inliner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17103
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sun, 17 Oct 2004 23:03:32 +0000 (23:03 +0000)]
Pass -single_module option to gcc when linking dynamic libraries for use with bugpoint, so that we can bugpoint multiple .cp files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17102
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sun, 17 Oct 2004 23:01:34 +0000 (23:01 +0000)]
Generate correct stubs for weak-linked symbols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17101
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 17 Oct 2004 21:54:55 +0000 (21:54 +0000)]
fold gep undef, ... -> undef
This comes up many times in perlbmk and probably others.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17100
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 17 Oct 2004 21:31:34 +0000 (21:31 +0000)]
Remove printout, realize that instructions in the entry block dominate all
other blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17099
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 17 Oct 2004 21:25:56 +0000 (21:25 +0000)]
When inserting PHI nodes, don't insert any phi nodes that are obviously
unneccesary. This allows us to delete several hundred phi nodes of the
form PHI(x,x,x,undef) from 253.perlbmk and probably other programs as well.
This implements Mem2Reg/UndefValuesMerge.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17098
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 17 Oct 2004 21:25:32 +0000 (21:25 +0000)]
New testcase, no PHI should be inserted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17097
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 17 Oct 2004 21:23:26 +0000 (21:23 +0000)]
Enhance hasConstantValue to ignore undef values in phi nodes. This allows it
to think that PHI[4, undef] == 4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17096
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 17 Oct 2004 21:22:38 +0000 (21:22 +0000)]
hasConstantValue will soon return instructions that don't dominate the PHI node,
so prepare for this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17095
91177308-0d34-0410-b5e6-
96231b3b80d8