summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
Commit message (Collapse)AuthorAgeFilesLines
* add targetoperand flags for jump tables, constant pool and block addressChris Lattner2010-11-151-1/+1
| | | | | | | | | | | | | | nodes to indicate when ha16/lo16 modifiers should be used. This lets us pass PowerPC/indirectbr.ll. The one annoying thing about this patch is that the MCSymbolExpr isn't expressive enough to represent ha16(label1-label2) which we need on PowerPC. I have a terrible hack in the meantime, but this will have to be revisited at some point. Last major conversion item left is global variable references. llvm-svn: 119105
* Use indirect calls in PowerPC JIT.Torok Edwin2010-08-041-0/+4
| | | | | | | | | See PR5201. There is no way to know if direct calls will be within the allowed range for BL. Hence emit all calls as indirect when in JIT mode. Without this long-running applications will fail to JIT on PowerPC with a relocation failure. llvm-svn: 110246
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer. Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it. Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735. llvm-svn: 94686
* eliminate asmflavor from subtarget, PPCTAI is the only clientChris Lattner2009-08-111-5/+1
| | | | | | and each callee knows that it returns. llvm-svn: 78742
* Remove some dead code.Daniel Dunbar2009-08-051-9/+0
| | | | llvm-svn: 78219
* Normalize Subtarget constructors to take a target triple string instead ofDaniel Dunbar2009-08-021-7/+6
| | | | | | | | | | Module*. Also, dropped uses of TargetMachine where unnecessary. The only target which still takes a TargetMachine& is Mips, I would appreciate it if someone would normalize this to match other targets. llvm-svn: 77918
* Tidy up #includes, deleting a bunch of unnecessary #includes.Dan Gohman2009-01-051-0/+1
| | | | llvm-svn: 61715
* Re-did 60519. It turns out Darwin's handling of hidden visibility symbols ↵Evan Cheng2008-12-051-3/+6
| | | | | | are a bit more complicate than I expected. Both declarations and weak definitions still need a stub indirection. However, the stubs are in data section and they contain the addresses of the actual symbols. llvm-svn: 60571
* Temporarily revert r60519. It was causing a bootstrap failure:Bill Wendling2008-12-041-3/+1
| | | | | | | | | | | | | | | | /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/bin/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/lib/ -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/include -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/sys-include -DHAVE_CONFIG_H -I. -I../../../llvm-gcc.src/libgomp -I. -I../../../llvm-gcc.src/libgomp/config/posix -I../../../llvm-gcc.src/libgomp -Wall -pthread -Werror -O2 -g -O2 -MT barrier.lo -MD -MP -MF .deps/barrier.Tpo -c ../../../llvm-gcc.src/libgomp/barrier.c -fno-common -DPIC -o .libs/barrier.o checking for sys/file.h... /var/folders/zG/zGE-ZJOGFiGjv0B5cs5oYE+++TM/-Tmp-//cc34Jg5P.s:13:non-relocatable subtraction expression, "_gomp_tls_key" minus "L1$pb" /var/folders/zG/zGE-ZJOGFiGjv0B5cs5oYE+++TM/-Tmp-//cc34Jg5P.s:13:symbol: "_gomp_tls_key" can't be undefined in a subtraction expression make[4]: *** [barrier.lo] Error 1 make[4]: *** Waiting for unfinished jobs.... /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/bin/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/lib/ -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/include -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/sys-include -DHAVE_CONFIG_H -I. -I../../../llvm-gcc.src/libgomp -I. -I../../../llvm-gcc.src/libgomp/config/posix -I../../../llvm-gcc.src/libgomp -Wall -pthread -Werror -O2 -g -O2 -MT alloc.lo -MD -MP -MF .deps/alloc.Tpo -c ../../../llvm-gcc.src/libgomp/alloc.c -o alloc.o >/dev/null 2>&1 yes checking for sys/param.h... make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-target-libgomp] Error 2 make[1]: *** Waiting for unfinished jobs.... llvm-svn: 60527
* Visibility hidden GVs do not require extra load of symbol address from the ↵Evan Cheng2008-12-041-1/+3
| | | | | | GOT or non-lazy-ptr. llvm-svn: 60519
* Add a missed CommonLinkage check.Dale Johannesen2008-05-231-0/+1
| | | | llvm-svn: 51503
* Cosmetics.Dale Johannesen2008-02-151-6/+3
| | | | llvm-svn: 47168
* Remove warning about 64-bit code on processorDale Johannesen2008-02-151-4/+0
| | | | | | that doesn't support it. Per Chris. llvm-svn: 47162
* Rewrite tblgen handling of subtarget features soDale Johannesen2008-02-141-0/+1
| | | | | | | | | | it follows the order of the enum, not alphabetical. The motivation is to make -mattr=+ssse3,+sse41 select SSE41 as it ought to. Added "ignored" enum values of 0 to PPC and SPU to avoid compiler warnings. llvm-svn: 47143
* Use size_t to store Pos, avoid truncating valueDuncan Sands2008-01-081-1/+1
| | | | | | | | on 64-bit builds. Analysis and original patch by Török Edwin. Code audit found another place with the same problem, also fixed here. llvm-svn: 45746
* leopard and above support alignment for common symbols.Chris Lattner2008-01-021-7/+19
| | | | llvm-svn: 45493
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Here is the bulk of the sanitizing.Gabor Greif2007-07-051-1/+1
| | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. llvm-svn: 37913
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-301-1/+1
| | | | | | confusion with external linkage types. llvm-svn: 33663
* Instead of yet another enum indicating the "assembly language flavor",Bill Wendling2007-01-161-0/+3
| | | | | | just use the one that's in the subtarget. llvm-svn: 33255
* Another step forward in PPC64 JIT support: we now no-longer need stubsChris Lattner2006-12-111-4/+34
| | | | | | | | | | emitted for external globals in PPC64-JIT-PIC mode (which is good because we didn't handle them before!). This also fixes a bug handling the picbase delta, which we would get wrong in some cases. llvm-svn: 32451
* What should be the last unnecessary <iostream>s in the library.Bill Wendling2006-12-071-5/+4
| | | | llvm-svn: 32333
* Remove what little AIX support we have. It has never been tested and isn'tChris Lattner2006-07-151-6/+1
| | | | | | complete. llvm-svn: 29156
* Force 64-bit register availability in 64-bit mode. For real.Chris Lattner2006-06-161-2/+2
| | | | llvm-svn: 28837
* Remove the -darwin and -aix llc options, inferring darwinism and aixism fromChris Lattner2006-06-161-15/+3
| | | | | | the target triple & subtarget info. woo. llvm-svn: 28835
* Document the subtarget features better, make sure that 64-bit mode, 64-bitChris Lattner2006-06-161-0/+21
| | | | | | | | | | support, and 64-bit register use are all consistent with each other. Add a new "IsPPC" feature, to distinguish ppc32 vs ppc64 targets, use this to configure TargetData differently. This not makes ppc64 blow up on lots of stuff :) llvm-svn: 28825
* Rename some subtarget features. A CPU now can *have* 64-bit instructions,Chris Lattner2006-06-161-2/+2
| | | | | | can in 32-bit mode we can choose to optionally *use* 64-bit registers. llvm-svn: 28824
* First baby step towards ppc64 support. This adds a new -march=ppc64 backendChris Lattner2006-06-161-1/+1
| | | | | | that is currently just like ppc32 :) llvm-svn: 28813
* Compile this:Chris Lattner2006-03-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | void foo(float a, int *b) { *b = a; } to this: _foo: fctiwz f0, f1 stfiwx f0, 0, r4 blr instead of this: _foo: fctiwz f0, f1 stfd f0, -8(r1) lwz r2, -4(r1) stw r2, 0(r4) blr This implements CodeGen/PowerPC/stfiwx.ll, and also incidentally does the right thing for GCC bugzilla 26505. llvm-svn: 26447
* - Added option -relocation-model to set relocation model. Valid values ↵Evan Cheng2006-02-221-7/+1
| | | | | | | | | | include static, pic, dynamic-no-pic, and default. PPC and x86 default is dynamic-no-pic for Darwin, pic for others. - Removed options -enable-pic and -ppc-static. llvm-svn: 26315
* add a note about how we should implement this FIXME from the legalizer:Chris Lattner2006-01-281-1/+1
| | | | | | | | // FIXME: revisit this when we have some kind of mechanism by which targets // can decided legality of vector constants, of which there may be very // many. llvm-svn: 25733
* add an option to generate completely non-pic code, corresponding to whatChris Lattner2005-11-171-0/+6
| | | | | | | | | | | | | gcc -static produces on PPC. This is used for building kexts and other things. With this, materializing the address of a global looks like: lis r2, ha16(L_H$non_lazy_ptr) la r3, lo16(L_H$non_lazy_ptr)(r2) we're still emitting stubs for functions, which is wrong. That is next. llvm-svn: 24399
* Allow itineraries to be passed through the Target Machine.Jim Laskey2005-11-011-0/+1
| | | | llvm-svn: 24139
* Give full control of subtarget features over to table generated code.Jim Laskey2005-10-261-9/+12
| | | | llvm-svn: 24013
* Preparation of supporting scheduling info. Need to find info based on selectedJim Laskey2005-10-251-3/+4
| | | | | | CPU. llvm-svn: 23974
* Simplify this, matching changes in the tblgen emitterChris Lattner2005-10-231-9/+0
| | | | llvm-svn: 23909
* Plugin new subtarget backend into the build.Jim Laskey2005-10-211-58/+13
| | | | llvm-svn: 23870
* Do the right thing and enable 64 bit regs under the control of a subtargetNate Begeman2005-10-181-0/+3
| | | | | | | option. Currently the only way to enable this is to specify the 64bitregs mattr flag. It is never enabled by default on any config yet. llvm-svn: 23779
* Rename PowerPC*.h to PPC*.hChris Lattner2005-10-141-2/+2
| | | | llvm-svn: 23743
* On non-apple systems, when using -march=ppc32, do not print:Chris Lattner2005-09-071-1/+1
| | | | | | | | '' is not a recognized processor for this target (ignoring processor) Default to "generic" instead of "" for the default CPU. llvm-svn: 23257
* Add accessor for 64bit flag, so that we can tell when it is safe toNate Begeman2005-09-061-0/+1
| | | | | | generate the fun in-register fp<->long instructions. llvm-svn: 23244
* Add help support for -mcpu and -mattr.Jim Laskey2005-09-021-21/+27
| | | | llvm-svn: 23222
* Decouple fsqrt from gpul optimizations, implementing fsqrt.ll.Chris Lattner2005-09-021-7/+4
| | | | | | Remove the -enable-gpopt option which is subsumed by feature flags. llvm-svn: 23218
* 1. Use SubtargetFeatures in llc/lli.Jim Laskey2005-09-011-10/+82
| | | | | | | | 2. Propagate feature "string" to all targets. 3. Implement use of SubtargetFeatures in PowerPCTargetSubtarget. llvm-svn: 23192
* Consolidate the GPOpt stuff to all use the Subtarget, instead of stillChris Lattner2005-08-051-10/+27
| | | | | | | | depending on the command line option. Now the command line option just sets the subtarget as appropriate. G5 opts will now default to on on G5-enabled nightly testers among other machines. llvm-svn: 22688
* Enable gp optimizations by default when available, even when a target tripleChris Lattner2005-08-051-0/+3
| | | | | | | is available, since the target triple doesn't specify whether to use gpopts or not. llvm-svn: 22685
* Add Subtarget support to PowerPC. Next up, using it.Nate Begeman2005-08-041-0/+54
llvm-svn: 22644
OpenPOWER on IntegriCloud