oota-llvm.git
15 years agoDrop an unnecessary include.
Gordon Henriksen [Sun, 17 Aug 2008 18:54:05 +0000 (18:54 +0000)]
Drop an unnecessary include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54901 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRegenerate.
Gordon Henriksen [Sun, 17 Aug 2008 18:48:50 +0000 (18:48 +0000)]
Regenerate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54900 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename some GC classes so that their roll will hopefully be clearer.
Gordon Henriksen [Sun, 17 Aug 2008 18:44:35 +0000 (18:44 +0000)]
Rename some GC classes so that their roll will hopefully be clearer.

In particular, Collector was confusing to implementors. Several
thought that this compile-time class was the place to implement
their runtime GC heap. Of course, it doesn't even exist at runtime.
Specifically, the renames are:

  Collector               -> GCStrategy
  CollectorMetadata       -> GCFunctionInfo
  CollectorModuleMetadata -> GCModuleInfo
  CollectorRegistry       -> GCRegistry
  Function::getCollector  -> getGC (setGC, hasGC, clearGC)

Several accessors and nested types have also been renamed to be
consistent. These changes should be obvious.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54899 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake it compile on VC2005:
Cedric Venet [Sun, 17 Aug 2008 18:24:26 +0000 (18:24 +0000)]
Make it compile on VC2005:
- update VC projects.
- Add an overload to llvm::Stream for <<, since std::hex and std::dec have type std::ios_base& (*)(std::ios_base&) in VC++. (templating the function don't work, due to ambiguities)
- add ../ on several include in X86/AsmPrinter/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54898 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agogetLLVMName is only used for types now, which always pass in LocalPrefix. Specialize...
Chris Lattner [Sun, 17 Aug 2008 17:28:37 +0000 (17:28 +0000)]
getLLVMName is only used for types now, which always pass in LocalPrefix.  Specialize on it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54897 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoswitch valuemap's from std::map to densemap. This speeds up llvm-dis
Chris Lattner [Sun, 17 Aug 2008 17:25:25 +0000 (17:25 +0000)]
switch valuemap's from std::map to densemap.  This speeds up llvm-dis
on a stripped kc++ .bc file from 0.83 to 0.77s (8%)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54896 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't instantiate GC metadata for declarations.
Gordon Henriksen [Sun, 17 Aug 2008 16:18:50 +0000 (16:18 +0000)]
Don't instantiate GC metadata for declarations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54895 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSet ignores.
Gordon Henriksen [Sun, 17 Aug 2008 14:41:11 +0000 (14:41 +0000)]
Set ignores.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54894 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSet ignores.
Gordon Henriksen [Sun, 17 Aug 2008 14:40:45 +0000 (14:40 +0000)]
Set ignores.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54893 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLink GC metadata printers by default to llc
Anton Korobeynikov [Sun, 17 Aug 2008 14:33:01 +0000 (14:33 +0000)]
Link GC metadata printers by default to llc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54892 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix merge error
Anton Korobeynikov [Sun, 17 Aug 2008 13:56:03 +0000 (13:56 +0000)]
Fix merge error

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54891 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove asmprinters from examples by default. This reduces their size by ~5%
Anton Korobeynikov [Sun, 17 Aug 2008 13:55:33 +0000 (13:55 +0000)]
Remove asmprinters from examples by default. This reduces their size by ~5%

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54890 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove ARM to pluggable asmprinter
Anton Korobeynikov [Sun, 17 Aug 2008 13:55:10 +0000 (13:55 +0000)]
Move ARM to pluggable asmprinter

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54889 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse correct name for PPC codegen library
Anton Korobeynikov [Sun, 17 Aug 2008 13:54:44 +0000 (13:54 +0000)]
Use correct name for PPC codegen library

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54888 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFactor out asmprinter out of ppc
Anton Korobeynikov [Sun, 17 Aug 2008 13:54:28 +0000 (13:54 +0000)]
Factor out asmprinter out of ppc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54887 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove X86 assembler printers into separate directory. This allows JIT-only users not...
Anton Korobeynikov [Sun, 17 Aug 2008 13:53:59 +0000 (13:53 +0000)]
Move X86 assembler printers into separate directory. This allows JIT-only users not to link it in (use 'x86codegen' llvm-config arg for this)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54886 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove all assembler printing related stuff into new libAsmPrinter
Anton Korobeynikov [Sun, 17 Aug 2008 13:53:04 +0000 (13:53 +0000)]
Move all assembler printing related stuff into new libAsmPrinter

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54885 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFactor out asmprinters from collector interface.
Anton Korobeynikov [Sun, 17 Aug 2008 13:52:35 +0000 (13:52 +0000)]
Factor out asmprinters from collector interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54884 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFactor GC metadata table assembly generation out of Collector in preparation for...
Gordon Henriksen [Sun, 17 Aug 2008 12:56:54 +0000 (12:56 +0000)]
Factor GC metadata table assembly generation out of Collector in preparation for splitting AsmPrinter into its own library.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54881 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFactor GC metadata table assembly generation out of Collector in preparation for...
Gordon Henriksen [Sun, 17 Aug 2008 12:08:44 +0000 (12:08 +0000)]
Factor GC metadata table assembly generation out of Collector in preparation for splitting AsmPrinter into its own library.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54880 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGet raw_ostream.cpp to compile on MSVC.
Argyrios Kyrtzidis [Sun, 17 Aug 2008 09:25:21 +0000 (09:25 +0000)]
Get raw_ostream.cpp to compile on MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54879 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert 54821. It's miscompiling 252.eon and 447.dealII
Evan Cheng [Sun, 17 Aug 2008 08:07:31 +0000 (08:07 +0000)]
Revert 54821. It's miscompiling 252.eon and 447.dealII

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54878 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoI found a better place for this optz'n.
Nick Lewycky [Sun, 17 Aug 2008 07:54:14 +0000 (07:54 +0000)]
I found a better place for this optz'n.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54877 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoXor'ing both sides of icmp by sign-bit is equivalent to swapping signedness of
Nick Lewycky [Sun, 17 Aug 2008 07:34:14 +0000 (07:34 +0000)]
Xor'ing both sides of icmp by sign-bit is equivalent to swapping signedness of
the predicate.

Also, make this optz'n apply in more cases where it's safe to do so.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54876 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoavoid an extraneous std::string construction
Chris Lattner [Sun, 17 Aug 2008 07:24:08 +0000 (07:24 +0000)]
avoid an extraneous std::string construction

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54875 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRework the routines that convert AP[S]Int into a string. Now, instead of
Chris Lattner [Sun, 17 Aug 2008 07:19:36 +0000 (07:19 +0000)]
Rework the routines that convert AP[S]Int into a string.  Now, instead of
returning an std::string by value, it fills in a SmallString/SmallVector
passed in.  This significantly reduces string thrashing in some cases.

More specifically, this:
 - Adds an operator<< and a print method for APInt that allows you to
   directly send them to an ostream.
 - Reimplements APInt::toString to be much simpler and more efficient
   algorithmically in addition to not thrashing strings quite as much.

This speeds up llvm-dis on kc++ by 7%, and may also slightly speed up the
asmprinter.  This also fixes a bug I introduced into the asmwriter in a
previous patch w.r.t. alias printing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54873 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix build on GCC 4.3.
Nick Lewycky [Sun, 17 Aug 2008 06:40:16 +0000 (06:40 +0000)]
Fix build on GCC 4.3.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54870 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove a dead APInt ctor.
Chris Lattner [Sun, 17 Aug 2008 04:58:58 +0000 (04:58 +0000)]
remove a dead APInt ctor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54869 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoavoid string thrashing when formatting names in output. This
Chris Lattner [Sun, 17 Aug 2008 04:40:13 +0000 (04:40 +0000)]
avoid string thrashing when formatting names in output.  This
speeds up release-asserts llvm-dis on kc++ from 1.86s to 1.04s (~79%)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54868 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorandom cleanups.
Chris Lattner [Sun, 17 Aug 2008 04:17:45 +0000 (04:17 +0000)]
random cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54866 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd support for a cout/cerr analog (outs()/errs()) as well as
Chris Lattner [Sun, 17 Aug 2008 04:13:37 +0000 (04:13 +0000)]
add support for a cout/cerr analog (outs()/errs()) as well as
a simple adaptor class to give raw output capabilities to
something that wants to write to an ostream.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54865 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoopening "-" automatically yields stdout.
Chris Lattner [Sun, 17 Aug 2008 03:53:23 +0000 (03:53 +0000)]
opening "-" automatically yields stdout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54863 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorename OutputData to 'write' to match ostream.
Chris Lattner [Sun, 17 Aug 2008 01:46:05 +0000 (01:46 +0000)]
rename OutputData to 'write' to match ostream.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54857 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove accidental comment.
Chris Lattner [Sun, 17 Aug 2008 01:35:54 +0000 (01:35 +0000)]
remove accidental comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54856 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a new raw_ostream class which is an extremely high performance ostream that
Chris Lattner [Sun, 17 Aug 2008 01:35:29 +0000 (01:35 +0000)]
add a new raw_ostream class which is an extremely high performance ostream that
can *only* output data (no seeking, reading, etc).  This is adapted from the
clang "-E outputter", and is roughly 10% faster than stdio on darwin and 30%
(or more) faster than std::ostream.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54855 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPPC/Linux normally uses named section for bss
Anton Korobeynikov [Sat, 16 Aug 2008 12:59:02 +0000 (12:59 +0000)]
PPC/Linux normally uses named section for bss

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54847 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse proper strings section name for PPC
Anton Korobeynikov [Sat, 16 Aug 2008 12:58:46 +0000 (12:58 +0000)]
Use proper strings section name for PPC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54846 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse correct name for TLS address resolution routine on x86-64
Anton Korobeynikov [Sat, 16 Aug 2008 12:58:29 +0000 (12:58 +0000)]
Use correct name for TLS address resolution routine on x86-64

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54845 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd interface for section override. Use this for Sparc, since it should use named...
Anton Korobeynikov [Sat, 16 Aug 2008 12:58:12 +0000 (12:58 +0000)]
Add interface for section override. Use this for Sparc, since it should use named BSS section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54844 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove SLEB/ULEB size calculation routines from AsmPrinter to TargetAsmInfo. This makes...
Anton Korobeynikov [Sat, 16 Aug 2008 12:57:46 +0000 (12:57 +0000)]
Move SLEB/ULEB size calculation routines from AsmPrinter to TargetAsmInfo. This makes JIT asmprinter-free.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54843 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReduce heap trashing due to std::string construction / concatenation via caching...
Anton Korobeynikov [Sat, 16 Aug 2008 12:57:07 +0000 (12:57 +0000)]
Reduce heap trashing due to std::string construction / concatenation via caching of section flags string representations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54842 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove GCSE and LoadVN from the testsuite.
Owen Anderson [Sat, 16 Aug 2008 00:00:54 +0000 (00:00 +0000)]
Remove GCSE and LoadVN from the testsuite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54832 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove GCSE, ValueNumbering, and LoadValueNumbering. These have been deprecated...
Owen Anderson [Fri, 15 Aug 2008 21:31:02 +0000 (21:31 +0000)]
Remove GCSE, ValueNumbering, and LoadValueNumbering.  These have been deprecated for almost a year; it's finally time for them to go away.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54822 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReapply 54786. Add overflow and number of mantissa bits checks.
Devang Patel [Fri, 15 Aug 2008 21:21:34 +0000 (21:21 +0000)]
Reapply 54786. Add overflow and number of mantissa bits checks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54821 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConvert several std::vectors over to SmallVector, and use reserve() as appropriate...
Owen Anderson [Fri, 15 Aug 2008 18:49:41 +0000 (18:49 +0000)]
Convert several std::vectors over to SmallVector, and use reserve() as appropriate for cases where std::vector is still used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54820 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a value_type typedef to SmallVector, to make it more compatible with STL adapters.
Owen Anderson [Fri, 15 Aug 2008 18:45:51 +0000 (18:45 +0000)]
Add a value_type typedef to SmallVector, to make it more compatible with STL adapters.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54819 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInline the fastpath of PATypeHolder::get(). This is a small speedup in
Chris Lattner [Fri, 15 Aug 2008 15:16:50 +0000 (15:16 +0000)]
Inline the fastpath of PATypeHolder::get().  This is a small speedup in
instcombine among other things.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54814 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert 54786. It's not checking for overflows, etc.
Evan Cheng [Fri, 15 Aug 2008 08:12:11 +0000 (08:12 +0000)]
Revert 54786. It's not checking for overflows, etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54813 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agouse smallvector instead of vector for a couple worklists. This speeds up instcombine
Chris Lattner [Fri, 15 Aug 2008 04:03:01 +0000 (04:03 +0000)]
use smallvector instead of vector for a couple worklists.  This speeds up instcombine
by ~10% on some testcases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54811 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse SmallSet instead of std::set to save allocations.
Owen Anderson [Thu, 14 Aug 2008 23:41:38 +0000 (23:41 +0000)]
Use SmallSet instead of std::set to save allocations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54810 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRenaming LLVMC/dg.exp to LLVM/llvmc.exp
Bill Wendling [Thu, 14 Aug 2008 23:37:58 +0000 (23:37 +0000)]
Renaming LLVMC/dg.exp to LLVM/llvmc.exp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54809 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove MachineInstr::getOpcode inline.
Owen Anderson [Thu, 14 Aug 2008 23:25:30 +0000 (23:25 +0000)]
Move MachineInstr::getOpcode inline.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54807 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBuild the X86GenFastISel.inc file.
Dan Gohman [Thu, 14 Aug 2008 23:18:11 +0000 (23:18 +0000)]
Build the X86GenFastISel.inc file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54806 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe pass manager is not able to schedule -loop-deletion -loop-index-split.
Devang Patel [Thu, 14 Aug 2008 23:07:48 +0000 (23:07 +0000)]
The pass manager is not able to schedule -loop-deletion -loop-index-split.

The loop-deletion pass does not preserve dom frontier, which is required by
loop-index-split. When the PM checks dom frontier for loop-index-split, it has
already verified that lcssa is availalble. However, new dom frontier forces new
loop pass manager, which does not  have lcssa yet.

The PM should recheck availability of required analysis passes in such cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54805 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTemporarily revert r54792. It's causing an ICE during bootstrapping.
Bill Wendling [Thu, 14 Aug 2008 23:05:24 +0000 (23:05 +0000)]
Temporarily revert r54792. It's causing an ICE during bootstrapping.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54804 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAlso avoid pinsrw and pinsrb with a variable insertelement index.
Dan Gohman [Thu, 14 Aug 2008 22:53:18 +0000 (22:53 +0000)]
Also avoid pinsrw and pinsrb with a variable insertelement index.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54803 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConvert uses of std::vector in TargetInstrInfo to SmallVector. This change had to...
Owen Anderson [Thu, 14 Aug 2008 22:49:33 +0000 (22:49 +0000)]
Convert uses of std::vector in TargetInstrInfo to SmallVector.  This change had to be propoagated down into all the targets and up into all clients of this API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54802 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't try to use the insertps instruction for vector
Dan Gohman [Thu, 14 Aug 2008 22:43:26 +0000 (22:43 +0000)]
Don't try to use the insertps instruction for vector
element inserts with non-constant indices. This fixes
CodeGen/X86/vector-variable-idx.ll on machines that
have SSE4.1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54801 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake FastISel's constructor protected, and give it a destructor.
Dan Gohman [Thu, 14 Aug 2008 21:51:29 +0000 (21:51 +0000)]
Make FastISel's constructor protected, and give it a destructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54793 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse DenseMap. Patch by Pratik Solanki.
Devang Patel [Thu, 14 Aug 2008 21:31:10 +0000 (21:31 +0000)]
Use DenseMap. Patch by Pratik Solanki.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54792 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemoved redundant ctor.
Ted Kremenek [Thu, 14 Aug 2008 21:17:07 +0000 (21:17 +0000)]
Removed redundant ctor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54789 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove more uses of std::set.
Owen Anderson [Thu, 14 Aug 2008 21:01:00 +0000 (21:01 +0000)]
Remove more uses of std::set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54787 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIf IV is used in a int-to-float cast inside the loop then try to eliminate the cast...
Devang Patel [Thu, 14 Aug 2008 20:58:31 +0000 (20:58 +0000)]
If IV is used in a int-to-float cast inside the loop then try to eliminate the cast opeation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54786 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHave LeakDetector use a SmallPtrSet instead of an std::set.
Owen Anderson [Thu, 14 Aug 2008 20:40:10 +0000 (20:40 +0000)]
Have LeakDetector use a SmallPtrSet instead of an std::set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54785 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImprove support for vector casts in LLVM IR and CodeGen.
Dan Gohman [Thu, 14 Aug 2008 20:04:46 +0000 (20:04 +0000)]
Improve support for vector casts in LLVM IR and CodeGen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54784 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSpeed up addRegisterDead by adding more fast checks before performing the expensive
Owen Anderson [Thu, 14 Aug 2008 18:34:18 +0000 (18:34 +0000)]
Speed up addRegisterDead by adding more fast checks before performing the expensive
subregister query, and by increasing the size of the subregister hashtable so
that there are fewer collisions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54781 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse empty() instead of begin() == end().
Dan Gohman [Thu, 14 Aug 2008 18:13:49 +0000 (18:13 +0000)]
Use empty() instead of begin() == end().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54780 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReplace two for loops with while(!X->use_empty()) loops. This prevents
Matthijs Kooijman [Thu, 14 Aug 2008 15:03:05 +0000 (15:03 +0000)]
Replace two for loops with while(!X->use_empty()) loops. This prevents
invalidating the iterator by deleting the current use. This fixes a segfault on
64 bit linux reported in PR2675.

Also remove an unneeded if.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54778 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGet rid of a use of std::map.
Owen Anderson [Wed, 13 Aug 2008 23:36:23 +0000 (23:36 +0000)]
Get rid of a use of std::map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54770 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a bogus srem rule - a negative value srem'd by a power-of-2
Dan Gohman [Wed, 13 Aug 2008 23:12:35 +0000 (23:12 +0000)]
Fix a bogus srem rule - a negative value srem'd by a power-of-2
can have a non-negative result; for example, -16%16 is 0. Also,
clarify the related comments. This fixes PR2670.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54767 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExpunge the last uses of std::map from LiveIntervals.
Owen Anderson [Wed, 13 Aug 2008 22:28:50 +0000 (22:28 +0000)]
Expunge the last uses of std::map from LiveIntervals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54766 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove r2iMap_ over to DenseMap from std::map.
Owen Anderson [Wed, 13 Aug 2008 22:08:30 +0000 (22:08 +0000)]
Move r2iMap_ over to DenseMap from std::map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54765 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAllow SelectionDAG to create EXTRACT_VECTOR_ELT nodes with
Dan Gohman [Wed, 13 Aug 2008 21:51:37 +0000 (21:51 +0000)]
Allow SelectionDAG to create EXTRACT_VECTOR_ELT nodes with
non-constant indices. Only a few of the peephole checks require
a constant index.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54764 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake the allocation of LiveIntervals explicit, rather than holding them in the r2iMap...
Owen Anderson [Wed, 13 Aug 2008 21:49:13 +0000 (21:49 +0000)]
Make the allocation of LiveIntervals explicit, rather than holding them in the r2iMap_ by value.  This will prevent references to them from being invalidated
if the map is changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54763 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSwitch this from std::map to DenseMap.
Owen Anderson [Wed, 13 Aug 2008 21:24:24 +0000 (21:24 +0000)]
Switch this from std::map to DenseMap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54761 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix SCCP's handling of struct value loads and stores. SCCP doesn't
Dan Gohman [Wed, 13 Aug 2008 21:22:48 +0000 (21:22 +0000)]
Fix SCCP's handling of struct value loads and stores. SCCP doesn't
track individual leaf values in such cases, so it needs to treat
struct values as normal values in this case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54760 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd svn:ignore on several Release-Asserts directories
Daniel Dunbar [Wed, 13 Aug 2008 20:54:16 +0000 (20:54 +0000)]
Add svn:ignore on several Release-Asserts directories

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54758 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd default constructor to APSInt
Daniel Dunbar [Wed, 13 Aug 2008 20:53:17 +0000 (20:53 +0000)]
Add default constructor to APSInt
 - Creates uninitialized APInt.
 - Prevents need for embedding arbitrary constants when used as an out
   parameter, for example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54757 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate makellvm to return correct result code.
Daniel Dunbar [Wed, 13 Aug 2008 20:43:56 +0000 (20:43 +0000)]
Update makellvm to return correct result code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54756 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename. s/FindIVForUser/FindIVUserForCond/g
Devang Patel [Wed, 13 Aug 2008 20:31:11 +0000 (20:31 +0000)]
Rename. s/FindIVForUser/FindIVUserForCond/g

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54754 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach constant folding that an inttoptr of a
Duncan Sands [Wed, 13 Aug 2008 20:20:35 +0000 (20:20 +0000)]
Teach constant folding that an inttoptr of a
ptrtoint can be turned into a bitcast if the
integer is at least as wide as a pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54752 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInitial checkin of the new "fast" instruction selection support. See
Dan Gohman [Wed, 13 Aug 2008 20:19:35 +0000 (20:19 +0000)]
Initial checkin of the new "fast" instruction selection support. See
the comments in FastISelEmitter.cpp for details on what this is.
This is currently experimental and unusable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54751 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoOops, check in these files too, for the FastISel -> Fast rename.
Dan Gohman [Wed, 13 Aug 2008 19:55:00 +0000 (19:55 +0000)]
Oops, check in these files too, for the FastISel -> Fast rename.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54750 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename SelectionDAGISel's FastISel to Fast, to begin to make
Dan Gohman [Wed, 13 Aug 2008 19:47:40 +0000 (19:47 +0000)]
Rename SelectionDAGISel's FastISel to Fast, to begin to make
room for the new FastISel instruction selection code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54749 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGenerated files for 54744.
Dale Johannesen [Wed, 13 Aug 2008 18:41:46 +0000 (18:41 +0000)]
Generated files for 54744.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54745 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd read/write support for X86's sseregparm.
Dale Johannesen [Wed, 13 Aug 2008 18:40:23 +0000 (18:40 +0000)]
Add read/write support for X86's sseregparm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54744 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGet rid of unused variable.
Owen Anderson [Wed, 13 Aug 2008 17:44:52 +0000 (17:44 +0000)]
Get rid of unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54742 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago1) Merge entire live intervals instead of parts of them.
Owen Anderson [Wed, 13 Aug 2008 17:25:42 +0000 (17:25 +0000)]
1) Merge entire live intervals instead of parts of them.
2) Conditionalize temporary insertion if we don't need it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54741 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename this, in case people think that NullFolder
Duncan Sands [Wed, 13 Aug 2008 08:56:48 +0000 (08:56 +0000)]
Rename this, in case people think that NullFolder
has something to do with folding null values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54725 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemoved SELECT_CC custom lowering. This is not needed anymore, the SELECT node
Bruno Cardoso Lopes [Wed, 13 Aug 2008 07:13:40 +0000 (07:13 +0000)]
Removed SELECT_CC custom lowering. This is not needed anymore, the SELECT node
is lowered properly and covers everything LowerSELECT_CC did.
Added method printUnsignedImm in AsmPrinter to print uimm16 operands. This
avoid the ugly instruction by instruction checking in printOperand.
Added a swap instruction present in the allegrex core.
Added two conditional instructions present in the allegrex core : MOVZ and MOVN.
They both allow a more efficient SELECT operation for integers.
Also added SELECT patterns to optimize MOVZ and MOVN usage.
The brcond and setcc patterns were cleaned: redundant and suboptimal patterns
were
removed. The suboptimals were replaced by more efficient ones.
Fixed some instructions that were using immZExt16 instead of immSExt16.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54724 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCheck sign to detect overflow before changing compare stride.
Devang Patel [Wed, 13 Aug 2008 02:05:14 +0000 (02:05 +0000)]
Check sign to detect overflow before changing compare stride.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54710 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen resolving a stub in x86-64 JIT, use a PC-relative branch
Dale Johannesen [Tue, 12 Aug 2008 23:20:24 +0000 (23:20 +0000)]
When resolving a stub in x86-64 JIT, use a PC-relative branch
rather than the absolute address if the target is within range.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54708 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove tabs.
Bill Wendling [Tue, 12 Aug 2008 23:15:44 +0000 (23:15 +0000)]
Remove tabs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54707 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate. Remove bogus webpage.
Bill Wendling [Tue, 12 Aug 2008 21:55:54 +0000 (21:55 +0000)]
Update. Remove bogus webpage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54705 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake x86-64 JIT changes Darwin-specific.
Dale Johannesen [Tue, 12 Aug 2008 21:02:08 +0000 (21:02 +0000)]
Make x86-64 JIT changes Darwin-specific.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54700 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a NullFolder class that doesn't fold constants.
Duncan Sands [Tue, 12 Aug 2008 20:39:27 +0000 (20:39 +0000)]
Add a NullFolder class that doesn't fold constants.
This may be used as the second IRBuilder template
parameter, the idea being that people learning LLVM
may find it helpful (several people asked on IRC
if it was possible to turn off constant folding
because it made it hard for them to see what was
going on).  Compiles, but otherwise completely
untested.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54698 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExtend ScalarEvolution's executesAtLeastOnce logic to be able to
Dan Gohman [Tue, 12 Aug 2008 20:17:31 +0000 (20:17 +0000)]
Extend ScalarEvolution's executesAtLeastOnce logic to be able to
continue past the first conditional branch when looking for a
relevant test. This helps it avoid using MAX expressions in
loop trip counts in more cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54697 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhitespace cleanup. Test commit.
Jim Grosbach [Tue, 12 Aug 2008 18:34:45 +0000 (18:34 +0000)]
Whitespace cleanup. Test commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54695 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIn the absence of a linker to build the GOT, use the 32-bit
Dale Johannesen [Tue, 12 Aug 2008 18:23:48 +0000 (18:23 +0000)]
In the absence of a linker to build the GOT, use the 32-bit
non_lazy_ptr mechanism on x86-64 Darwin JIT.  Fixes a bunch
of last night's failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54692 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCorrect the filename in the top-of-file comment.
Dan Gohman [Tue, 12 Aug 2008 17:42:33 +0000 (17:42 +0000)]
Correct the filename in the top-of-file comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54688 91177308-0d34-0410-b5e6-96231b3b80d8