Reid Spencer [Mon, 13 Dec 2004 20:03:02 +0000 (20:03 +0000)]
For PR351:
Replace MakeFileReadable and MakeFileExecutable (from FileUtilities) with
sys::Path::makeReadable and sys::Path:makeExecutable, respectively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18909
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 13 Dec 2004 20:00:02 +0000 (20:00 +0000)]
Get rid of getSizeOf, using ConstantExpr::getSizeOf instead.
do not insert a prototype for malloc of: void* malloc(uint): on 64-bit u
targets this is not correct. Instead of prototype it as void *malloc(...),
and pass the correct intptr_t through the "...".
Finally, fix Regression/CodeGen/SparcV9/2004-12-13-MallocCrash.ll, by not
forming constantexpr casts from pointer to uint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18908
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 19:59:50 +0000 (19:59 +0000)]
For PR351:
Implement three new functions to allow setting access/permission bits on
the file referenced by a path. The makeReadable and makeExecutable methods
replace the FileUtilities MakeFileReadable and MakeFileExecutable
functions. The makeWritable function is new and provided for consistency
since Path has a writable() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18907
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 13 Dec 2004 19:48:51 +0000 (19:48 +0000)]
Change this method to return ulong, not uint, for 64-bit targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18906
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 13 Dec 2004 19:10:32 +0000 (19:10 +0000)]
New testcase that crashes the V9 backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18905
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 18:41:28 +0000 (18:41 +0000)]
Genericize implementation of GetDLLSuffix now that we have LTDL_SHLIB_EXT
available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18904
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 18:28:59 +0000 (18:28 +0000)]
For PR351:
The ReadFileIntoAddressSpace and UnmapFileFromAddressSpace functions are no
longer used by LLVM. Remove them. Replacement functionality for both
functions is now encapsulated in the sys::MappedFile class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18903
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 18:25:27 +0000 (18:25 +0000)]
For PR351:
Use sys::MappedFile instead of ReadFileIntoAddressSpace and
UnmapFileFromAddressSpace. sys::MappedFile has the nice property that it
cleans up after itself so exception handling can be removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18902
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Mon, 13 Dec 2004 18:08:29 +0000 (18:08 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18901
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 13 Dec 2004 17:53:11 +0000 (17:53 +0000)]
Fix this test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18900
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Mon, 13 Dec 2004 17:44:14 +0000 (17:44 +0000)]
Add llvm tool variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18897
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 17:41:13 +0000 (17:41 +0000)]
For PR351:
* Change use of ReadFileIntoAddressSpace to sys::MappedFile use.
* Shorten a line > 80 chars.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18896
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 13 Dec 2004 17:23:11 +0000 (17:23 +0000)]
Set the rounding mode for the X86 FPU to 64-bits instead of 80-bits. We
don't support long double anyway, and this gives us FP results closer to
other targets.
This also speeds up 179.art from 41.4s to 18.32s, by eliminating a problem
with extra precision that causes an FP == comparison to fail (leading to
extra loop iterations).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18895
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 17:18:19 +0000 (17:18 +0000)]
Make the loop termination condition clear when building the set of items to
pass to the Linker::LinkInItems function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18894
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 17:02:08 +0000 (17:02 +0000)]
For PR351: libLLVMSupport now depends on libLLVMSystem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18893
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 17:01:53 +0000 (17:01 +0000)]
For PR351: \
The getFileTimestamp and getFileSize functions have been removed from \
FileUtilities.{h,cpp}. They are replaced by Path::getTimestamp and \
Path::getSize,respectively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18892
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 16:28:53 +0000 (16:28 +0000)]
Added a size_type typedef to LLVM containers to make Visual Studio shut up
(and possibly to make LLVM more x86 64bit friendly).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18891
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 16:22:32 +0000 (16:22 +0000)]
Add a convenience function for clearing the two global areas.
Patch contributed by Morten Ofsted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18890
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 16:04:04 +0000 (16:04 +0000)]
Get rid of some leaks found by VC leak detector.
Patch contributed by Morten Ofsted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18889
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 09:37:41 +0000 (09:37 +0000)]
Minor syntactical change to make this a little easier to comprehend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18888
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 08:53:36 +0000 (08:53 +0000)]
Make use of the new Path inserter function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18887
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 07:51:52 +0000 (07:51 +0000)]
Fix a bug where "." or any single character file name doesn't get the
terminating / when setDirectory is called.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18886
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 07:51:07 +0000 (07:51 +0000)]
Remove an always false clause from an if statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18885
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Mon, 13 Dec 2004 07:41:35 +0000 (07:41 +0000)]
Fix a bug where directory names of length one or less where not set
properly (examples: "", ".", "a").
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18883
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 07:40:50 +0000 (07:40 +0000)]
Use the new BYTECODE_DESTINATION to override the default bytecode install
destination for this library so that it goes to $(cferuntime_libdir) rather
than just $(libdir). Normal bytecode libraries should be installed in the
$(libdir), but these ones are "special" because they're part of the the
C/C++ front end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18882
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 07:38:55 +0000 (07:38 +0000)]
More properly name bytecode_libdir cferuntime_libdir. This is only the
libdir for the CFE runtime libraries, not "all bytecode".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18881
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 07:38:07 +0000 (07:38 +0000)]
Finish the implementation of the BYTECODE_DESTINATION feature for modules
too and getting rid of the last remnants of bytecode_libdir.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18880
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 07:28:21 +0000 (07:28 +0000)]
Implement a new feature, BYTECODE_DESTINATION, to allow a user makefile to
specify where the bytecode library is to be installed. This allows the
default location ($prefix/lib) to be overridden, for special case runtime
libraries like the cfe runtime libs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18879
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 06:57:15 +0000 (06:57 +0000)]
* Add a std::ostream inserter for sys::Path
* Correct the std::string constructor to take a const reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18877
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Mon, 13 Dec 2004 06:26:35 +0000 (06:26 +0000)]
Fix recent breakage of win32 build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18876
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 03:59:35 +0000 (03:59 +0000)]
Make sure the archive doesn't have to exist before we remove it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18873
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 03:56:42 +0000 (03:56 +0000)]
Always remove bytecode archives so that path mismatches don't cause the
contents to not be updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18872
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 03:50:50 +0000 (03:50 +0000)]
* Fix header block.
* Fix loop style per standards
* Don't create a new Module when the Linker's module is released.
* Add/fix function comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18871
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 03:23:13 +0000 (03:23 +0000)]
Add missing space in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18870
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 03:22:31 +0000 (03:22 +0000)]
Make sure the Archive gets deleted if there's an error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18869
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 03:15:47 +0000 (03:15 +0000)]
Remove commented out functions that have been replaced with lib/System
functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18868
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 03:13:18 +0000 (03:13 +0000)]
Fix header and function comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18867
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 03:03:42 +0000 (03:03 +0000)]
Implement new functions per new interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18866
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 03:01:26 +0000 (03:01 +0000)]
PR351: \
Use sys::Path not FileUtilities to check file types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18865
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 03:01:14 +0000 (03:01 +0000)]
Convert to use new Linker class interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18864
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 03:01:03 +0000 (03:01 +0000)]
LinkModules is now in the Linker class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18863
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 03:00:51 +0000 (03:00 +0000)]
For PR351: \
* Remove IsLibrary and GetLibraryPath, replaced by FindLibrary in ../Path.cpp \
* Implement GetSystemLibraryPaths and GetBytecodeLibraryPaths, instead of the \
GetSystemLibraryPath1 and GetSystemLibraryPath2 methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18862
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 03:00:39 +0000 (03:00 +0000)]
For PR351: \
* Move generic isArchive method here from Unix/Path.cpp \
* Implement isDynamicLibrary \
* Implement FindLibrary for Linker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18861
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 03:00:28 +0000 (03:00 +0000)]
This file contains basic Linker facilities needed by all tools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18860
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 03:00:16 +0000 (03:00 +0000)]
Make LinkModules a static member function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18859
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 03:00:04 +0000 (03:00 +0000)]
This file contains only the Linker's library linking support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18858
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 02:59:52 +0000 (02:59 +0000)]
For PR351: \
* Remove redundant static function LinkOneLibrary. \
* Remove unneded #includes \
* Convert FileSupport usage to sys::Path instead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18857
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 02:59:41 +0000 (02:59 +0000)]
This file contains only the Linker's file linking support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18856
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 02:59:29 +0000 (02:59 +0000)]
For PR351: \
* Convert functions to Linker:: methods. \
* Remove unneeded #includes \
* Utilize sys::Path utilities not FileSupport utilities \
* Move File & Library linking functions to other source files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18855
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 02:59:15 +0000 (02:59 +0000)]
For PR351: \
* Get file information from a MappedFile instance \
* Convert file type tests to sys::Path form
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18854
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 02:59:03 +0000 (02:59 +0000)]
Implement error handling in OpenAndLoad* functions so the Linker can handle it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18853
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 02:58:51 +0000 (02:58 +0000)]
Make the size() method const
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18852
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 02:58:40 +0000 (02:58 +0000)]
For PR351:\
* Modify file reading to use sys::MappedFile \
* Use sys::Path instead of std::string
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18851
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 02:58:28 +0000 (02:58 +0000)]
Add LLVMGCCDIR for path lookup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18850
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 02:58:16 +0000 (02:58 +0000)]
Make the OpenAndLoad functions have an ErrorMessage argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18849
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 02:58:05 +0000 (02:58 +0000)]
Completely rewrite the interface to be class based
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18848
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 02:57:53 +0000 (02:57 +0000)]
For PR351:\
* Consolidate path retrieval into just two methods. \
* Add FindLibrary as a convenience function. \
* Add isDynamicLibrary for testing for dynamic libs. \
* Make toString constant and reference clean.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18847
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 02:57:41 +0000 (02:57 +0000)]
For PR351:Remove the file type checking methods (now in sys::Path)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18846
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Dec 2004 02:16:51 +0000 (02:16 +0000)]
Get LLVMGCCDIR into the #defines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18845
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Mon, 13 Dec 2004 00:27:35 +0000 (00:27 +0000)]
Add V8 SPEC status.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18844
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 23:49:37 +0000 (23:49 +0000)]
Change indentation of a whole bunch of code, no real changes here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18843
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 23:40:17 +0000 (23:40 +0000)]
More substantial simplifications and speedups. This makes ADCE about 20% faster
in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18842
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 22:44:30 +0000 (22:44 +0000)]
More minor microoptimizations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18841
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 22:22:18 +0000 (22:22 +0000)]
Remove some more set operations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18840
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 22:16:13 +0000 (22:16 +0000)]
Reduce number of set operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18839
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 21:48:58 +0000 (21:48 +0000)]
Optimize div/rem + select combinations more.
In particular, implement div.ll:test10 and rem.ll:test4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18838
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 21:40:22 +0000 (21:40 +0000)]
Add testcases for simple things we can handle that occur now in vortex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18837
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 21:39:49 +0000 (21:39 +0000)]
Dejagnu doesn't work if you do TESTSUITE=.../
You can't pass the trailing / into Dejagnu, so make the makefile strip it off
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18836
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 20:36:19 +0000 (20:36 +0000)]
Fix Regression/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll, and all programs
when compiled with debug information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18835
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 20:34:06 +0000 (20:34 +0000)]
New testcase that the PPC backend miscompiles. It is emitting
.comm _X,0
For X, which makes the linker thing that X is never defined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18834
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 20:31:00 +0000 (20:31 +0000)]
CSE calls to getTypeSize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18833
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 19:34:41 +0000 (19:34 +0000)]
Properly implement copying of a global, fixing the 255.vortex & povray
failures from last night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18832
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 18:23:20 +0000 (18:23 +0000)]
Simplify code and do not invalidate iterators.
This fixes a crash compiling TimberWolfMC that was exposed due to recent
optimizer changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18831
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 17:40:28 +0000 (17:40 +0000)]
Use the target triple to pick this target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18830
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 17:20:23 +0000 (17:20 +0000)]
Get rid of subbullets for all of the "known problems" section. None of the
other sections have subbullets, and it make the TOC look like the whole
document is known problems!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18829
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Sun, 12 Dec 2004 08:22:11 +0000 (08:22 +0000)]
Complete the list of MultiSource failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18826
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 07:53:51 +0000 (07:53 +0000)]
Do not internalize a module if -link-as-library is passed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18825
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Sun, 12 Dec 2004 07:42:59 +0000 (07:42 +0000)]
hbd should be working now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18824
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Sun, 12 Dec 2004 07:42:58 +0000 (07:42 +0000)]
Finally enable the setcc-branch folding code.
Also, fix a bug where ubyte 255 would sometimes be output as -1. This
was afflicting hbd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18823
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Sun, 12 Dec 2004 06:22:30 +0000 (06:22 +0000)]
Add (currently disabled) code for canFoldSetCC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18820
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 06:03:06 +0000 (06:03 +0000)]
Though the previous xform applies to literally dozens (hundreds?) of variables
in SPEC, the subsequent optimziations that we are after don't play with
with FP values, so disable this xform for them. Really we just don't want
stuff like:
double G; (always 0 or 412312.312)
= G;
turning into:
bool G_b;
= G_b ? 412312.312 : 0;
We'd rather just do the load.
-Chris
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18819
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Sun, 12 Dec 2004 06:01:26 +0000 (06:01 +0000)]
Add stubs for setcc-branch folding support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18818
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 05:53:50 +0000 (05:53 +0000)]
If a variable can only hold two values, and is not already a bool, shrink it
down to actually BE a bool. This allows simple value range propagation
stuff work harder, deleting comparisons in bzip2 in some hot loops.
This implements GlobalOpt/integer-bool.ll, which is the essence of the
loop condition distilled into a testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18817
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Dec 2004 05:52:12 +0000 (05:52 +0000)]
New testcase. Shrinking the variable to a bool allows instcombine to delete
the condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18816
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 11 Dec 2004 23:15:19 +0000 (23:15 +0000)]
If one side of and/or is known to be 0/-1, it doesn't matter
if the other side is overdefined.
This allows us to fold conditions like: if (X < Y || Y > Z) in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18807
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 11 Dec 2004 23:14:40 +0000 (23:14 +0000)]
New testcase. If one side of and/or is known to be 0/-1, it doesn't matter
if the other side is overdefined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18806
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Sat, 11 Dec 2004 22:17:07 +0000 (22:17 +0000)]
Print llvm code one function at a time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18805
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 11 Dec 2004 22:10:29 +0000 (22:10 +0000)]
Check in the file I forgot last night, to solve all of the crashes in every
test in the suite. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18804
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Sat, 11 Dec 2004 18:41:09 +0000 (18:41 +0000)]
JIT should print LLVM each function before selecting instructions for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18803
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 11 Dec 2004 17:37:01 +0000 (17:37 +0000)]
Rename Path::get -> Path::toString
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18802
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 11 Dec 2004 17:13:19 +0000 (17:13 +0000)]
Update test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18801
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 11 Dec 2004 17:00:14 +0000 (17:00 +0000)]
Only cound if we actually made a change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18800
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 11 Dec 2004 16:59:54 +0000 (16:59 +0000)]
The split bb is really the exit of the old function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18799
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 11 Dec 2004 07:16:54 +0000 (07:16 +0000)]
A little cleanup on this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18798
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 11 Dec 2004 06:10:52 +0000 (06:10 +0000)]
New feature
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18797
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 11 Dec 2004 06:05:53 +0000 (06:05 +0000)]
Two bug fixes:
1. Actually increment the Statistic for the GV elim optzn
2. When resolving undef branches, only resolve branches in executable blocks,
avoiding marking a bunch of completely dead blocks live. This has a big
impact on the quality of the generated code.
With this patch, we positively rip up vortex, compiling Ut_MoveBytes to a
single memcpy call. In vortex we get this:
12 ipsccp - Number of globals found to be constant
986 ipsccp - Number of arguments constant propagated
1378 ipsccp - Number of basic blocks unreachable
8919 ipsccp - Number of instructions removed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18796
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 11 Dec 2004 05:32:19 +0000 (05:32 +0000)]
Do not delete the entry block to a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18795
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Sat, 11 Dec 2004 05:19:04 +0000 (05:19 +0000)]
Bools are *also* not ints. Sigh. Furthermore, most of the TargetMachine
ctor parameters can be defaulted.
Print the transformed llvm code input to the instruction selector
when -print-machineinstrs is on, just like V9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18794
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Sat, 11 Dec 2004 05:19:03 +0000 (05:19 +0000)]
Look for many more moves to fold (previously, we only
*or g0, x add g0, x recognized * as a move)
or x, g0 add x, g0
or 0, x add 0, x
or x, 0 add x, 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18793
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Sat, 11 Dec 2004 05:19:02 +0000 (05:19 +0000)]
Make GEPs not suck so much:
* Don't emit the Index * ElementSize multiply if Index is a constant.
* Use a shift, not a multiply, if ElementSize is 1/2/4/8.
* If ElementSize fits in the immediate field of SMUL, then put it there.
Fix a bug where struct offsets might be truncated (ConstantSInt::get is
now used instead of ConstantInt::get).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18792
91177308-0d34-0410-b5e6-
96231b3b80d8