Commit Graph

8423 Commits

Author SHA1 Message Date
Chris Lattner 24bba4d237 When merging to alias sets, if they are both must alias, the result is not
a must alias set unless all of the pointers in the resultant set are must
aliased together.

llvm-svn: 18275
2004-11-27 18:37:42 +00:00
Chris Lattner 14f3cdc227 Implement Regression/Transforms/InstCombine/getelementptr_cast.ll, which
occurs many times in crafty

llvm-svn: 18273
2004-11-27 17:55:46 +00:00
Nate Begeman 43123c9f7a Remove the ISel->AsmPrinter link via the TargetMachine that was put in
place to help bring up the PowerPC back end on Darwin.  This code is no
longer serves any purpose now that the AsmPrinter does the right thing
all the time printing GlobalValues.  --Cruft.

llvm-svn: 18267
2004-11-27 04:45:11 +00:00
Chris Lattner eeaa29c377 Add a new interface
llvm-svn: 18266
2004-11-26 21:36:25 +00:00
Chris Lattner b137409926 Provide size information when checking to see if we can LICM a load, this
allows us to hoist more loads in some cases.

llvm-svn: 18265
2004-11-26 21:20:09 +00:00
Chris Lattner f30656b437 When evaluating an AA, pass in size info
llvm-svn: 18264
2004-11-26 21:05:39 +00:00
Chris Lattner b50fd9262d There is no reason to store <x,x>, just store <x>.
llvm-svn: 18263
2004-11-26 20:25:17 +00:00
Chris Lattner 63b45b4768 The trick with globals actually works with allocas and malloc too
llvm-svn: 18262
2004-11-26 20:01:48 +00:00
Chris Lattner 75819a81b2 A store or load cannot alias a global if the accessed amount is larger then
the global.

This implements Regression/Analysis/BasicAA/global-size.ll

llvm-svn: 18261
2004-11-26 19:20:01 +00:00
Reid Spencer d49013f0b8 Add bzip2 subdirectory
llvm-svn: 18251
2004-11-25 19:38:28 +00:00
Reid Spencer fa8d2e0b27 Remove zlib support in favor of our own bzip2 library
llvm-svn: 18250
2004-11-25 19:38:16 +00:00
Reid Spencer af6fd29a08 Adjust to Compressor interface change
llvm-svn: 18249
2004-11-25 19:38:05 +00:00
Reid Spencer c51e80a09f Revise to LLVM makefile standards.
llvm-svn: 18246
2004-11-25 16:12:25 +00:00
Reid Spencer a01ef71032 Initial Version from bzip2 Release 1.0.2.
llvm-svn: 18245
2004-11-25 16:11:36 +00:00
Reid Spencer 8bb258d1ea Implement dependent library linking. It is no longer required that -lstdc++
-lstdsup++ no -lc be passed on the command line to llvm linkers if the
progam being linked was compiled with the C/C++ Front End or Stacker.

llvm-svn: 18243
2004-11-25 09:32:08 +00:00
Reid Spencer 2c4f9a484c Remove blank comment lines for uniformity.
Make sure lines don't exceed 80 cols.

llvm-svn: 18242
2004-11-25 09:29:44 +00:00
Nate Begeman 3f76eb69f6 Enable optimization suggested by Chris Lattner to not emit reloc stubs for
static global variables whose addresses are taken.  This allows us to
convert the following code for taking the address of a static function foo

        addis r2, r30, ha16(Ll1__2E_foo_2$non_lazy_ptr-"L00001$pb")
        lwz r3, lo16(Ll1__2E_foo_2$non_lazy_ptr-"L00001$pb")(r2)

which also includes linker stub code emitted at the end of the .s file not
shown here, and replace it with this:

        addis r2, r30, ha16(l1__2E_foo_2-"L00001$pb")
        la r3, lo16(l1__2E_foo_2-"L00001$pb")(r2)

which in addition to not needing linker help, also has no load instruction.
For those not up on PowerPC mnemonics, la is shorthand for add immediate.

llvm-svn: 18239
2004-11-25 07:09:01 +00:00
Chris Lattner 8cbad8efcf Fix the build on non ppc machines
llvm-svn: 18235
2004-11-25 06:14:45 +00:00
Chris Lattner 497a622376 The JIT works enough
llvm-svn: 18228
2004-11-25 04:14:54 +00:00
Chris Lattner da76c16ba4 Fix encoding of fsel, fixing olden/power, McCat/bisort and several others.
All of Olden passes now! :)

llvm-svn: 18227
2004-11-25 04:11:07 +00:00
Chris Lattner 305f78f646 Fix encoding of fneg instruction
llvm-svn: 18226
2004-11-25 03:53:44 +00:00
Chris Lattner 191e525bae Fix encoding of swari, fixing several programs, including Olden/mst
llvm-svn: 18225
2004-11-25 03:40:20 +00:00
Chris Lattner 5d8ae54267 There is not a 1-1 mappign between llvm blocks and PPC blocks, do not use
LLVM blocks as the keys for the branch rewriter.  This fixes treeadd and
many other programs with the JIT.

llvm-svn: 18223
2004-11-25 00:33:57 +00:00
Chris Lattner dd516799d7 * Rename existing relocations to be more specific
* Add relocations for refernces to non-lazy darwin stubs and implement
  them correctly.

With this change, we can correctly references external globals, and now
all but two UnitTests and all but 1 Regression/C tests pass.

More importantly, bugpoint-jit will start giving us useful testcases,
instead of always telling us that references to external globals don't
work :)

llvm-svn: 18222
2004-11-24 22:30:08 +00:00
Nate Begeman e49936af54 Add the same optimization that we do loading from fixed alloca slots to
storing to fixed alloca slots.

llvm-svn: 18221
2004-11-24 21:53:14 +00:00
Chris Lattner 078b6f2b62 Write CompilationCallback as an explicit assembly stub to avoid getting GCC's
prolog.

llvm-svn: 18220
2004-11-24 21:01:46 +00:00
Chris Lattner 659d72e319 When rewriting the original call instruction, make sure to rewrite it to
call the right address.

llvm-svn: 18213
2004-11-24 18:00:02 +00:00
Chris Lattner cb9af557e7 Force the intregs ptr into R2 and the FPregs ptr into R3. This fixes a really
obscure problem where we were doing:

lmw     r3,0(r9)

which is undefined on PPC.  Now we do:

lmw     r3,0(r2)

by force, not relying on the GCC register allocator for luck :)

llvm-svn: 18212
2004-11-24 17:42:55 +00:00
Reid Spencer 80bb693109 Implement and document prefix options with arbitrary values including an
= sign. This needed to support -DNAME=value options as pass-through in
llvmc.

llvm-svn: 18203
2004-11-24 06:13:42 +00:00
Brian Gaeke 7217642438 Update list of failing benchmarks.
llvm-svn: 18202
2004-11-24 04:07:42 +00:00
Brian Gaeke 1139802b98 Fix bug in emitGEPOperation with large struct-member offsets.
llvm-svn: 18201
2004-11-24 04:07:33 +00:00
Chris Lattner 130888ad37 Fix a few more tests by encoding the extsb and other XForm11 instructions
correctly.

llvm-svn: 18200
2004-11-24 03:52:02 +00:00
Chris Lattner 022e271db5 Fix the encoding of ORi and other DForm4 instructions. This brings us to
36/42 SingleSource/UnitTests passing!

llvm-svn: 18199
2004-11-24 02:15:41 +00:00
Chris Lattner 57542fcfc2 Loads are relocatable too
llvm-svn: 18198
2004-11-24 02:03:44 +00:00
Chris Lattner 7b1cf0d6c6 Calls do not need a MovPCtoLR instruction
llvm-svn: 18197
2004-11-24 02:00:06 +00:00
Chris Lattner 6a7ebe034e Get constant pools working. This fixes even more programs, allowing us to
pass 24/42 in UnitTests (up from 20).

llvm-svn: 18196
2004-11-24 01:56:12 +00:00
Tanya Lattner 13c71ca7b6 Forced branches to be first to be scheduled.
llvm-svn: 18195
2004-11-24 01:49:10 +00:00
Chris Lattner 193b6f3281 Rewrite branches more closely to correct. This makes more stuff pass, and
stops the infinite loops!

llvm-svn: 18194
2004-11-24 01:35:12 +00:00
Chris Lattner b55f748b1a Branch instructions explicitly represent CRx in them. bEcause of this, encode
them explicitly as well.

llvm-svn: 18193
2004-11-24 01:15:19 +00:00
Nate Begeman 674fe0bb60 Fix encoding of bctrl, and remove some unused instructions
llvm-svn: 18192
2004-11-24 00:16:37 +00:00
Reid Spencer a193f3cdbf Allow reading of member names that begin with an _ character.
llvm-svn: 18179
2004-11-23 22:35:39 +00:00
Chris Lattner c7eeae4661 Fix encoding of blr and bctr
llvm-svn: 18178
2004-11-23 22:06:24 +00:00
Nate Begeman c5fc6f5717 Use the correct register class as a constaint to gcc's inline assembly, so
that we don't end up trying to use r0 as a base register.

llvm-svn: 18176
2004-11-23 21:37:22 +00:00
Nate Begeman 617760687a Save/Restore arg regs and nonvolatile regs the compiler might use during
CompilationCallback

llvm-svn: 18175
2004-11-23 21:34:18 +00:00
Chris Lattner 578dfd5e42 Fix the encoding of OR, AND and many other instructions
llvm-svn: 18174
2004-11-23 21:17:35 +00:00
Brian Gaeke 94c58dc877 Support shr long/ulong.
llvm-svn: 18173
2004-11-23 21:10:50 +00:00
Brian Gaeke 8d4a5ad55c Support printing ConstantAggregateZeros.
llvm-svn: 18172
2004-11-23 21:10:49 +00:00
Brian Gaeke 2e7f71863f Update failing SingleSource test-case list.
llvm-svn: 18171
2004-11-23 21:10:48 +00:00
Chris Lattner a630adebc7 Remove argtype and argcount magic, which was used by the old asmprinter.
llvm-svn: 18170
2004-11-23 20:41:34 +00:00
Chris Lattner be39b8f541 Get rid of flags that are dead
llvm-svn: 18169
2004-11-23 20:37:41 +00:00