about summary refs log tree commit diff
path: root/src/librustc/lib
AgeCommit message (Collapse)AuthorLines
2013-08-15Add ToCStr method .with_c_str()Kevin Ballard-1/+1
.with_c_str() is a replacement for the old .as_c_str(), to avoid unnecessary boilerplate. Replace all usages of .to_c_str().with_ref() with .with_c_str().
2013-08-11auto merge of #8410 : luqmana/rust/mcpu, r=sanxiynbors-0/+1
Adds `--target-cpu` flag which lets you choose a more specific target cpu instead of just passing the default, `generic`. It's more or less akin to `-mcpu`/`-mtune` in clang/gcc.
2013-08-11auto merge of #8421 : alexcrichton/rust/unnamed-addr, r=thestingerbors-0/+9
This can be applied to statics and it will indicate that LLVM will attempt to merge the constant in .data with other statics. I have preliminarily applied this to all of the statics generated by the new `ifmt!` syntax extension. I compiled a file with 1000 calls to `ifmt!` and a separate file with 1000 calls to `fmt!` to compare the sizes, and the results were: ``` fmt 310k ifmt (before) 529k ifmt (after) 202k ``` This now means that ifmt! is both faster and smaller than fmt!, yay!
2013-08-10rustc: Add --target-cpu flag to select a more specific processor instead of ↵Luqman Aden-0/+1
the default, 'generic'.
2013-08-10auto merge of #8270 : dotdash/rust/ret_alloca_elim, r=pcwaltonbors-0/+2
When there is only a single store to the ret slot that dominates the load that gets the value for the "ret" instruction, we can elide the ret slot and directly return the operand of the dominating store instruction. This is the same thing that clang does, except for a special case that doesn't seem to affect us. Fixes #8238
2013-08-10Elide unnecessary ret slot allocasBjörn Steinbrink-0/+2
When there is only a single store to the ret slot that dominates the load that gets the value for the "ret" instruction, we can elide the ret slot and directly return the operand of the dominating store instruction. This is the same thing that clang does, except for a special case that doesn't seem to affect us. Fixes #8238
2013-08-09Implement an `address_insignificant` attributeAlex Crichton-0/+9
This can be applied to statics and it will indicate that LLVM will attempt to merge the constant in .data with other statics. I have preliminarily applied this to all of the statics generated by the new `ifmt!` syntax extension. I compiled a file with 1000 calls to `ifmt!` and a separate file with 1000 calls to `fmt!` to compare the sizes, and the results were: fmt 310k ifmt (before) 529k ifmt (after) 202k This now means that ifmt! is both faster and smaller than fmt!, yay!
2013-08-08Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-1/+1
remove-str-trailing-nulls
2013-08-07core: option.map_consume -> option.map_moveErick Tryzelaar-1/+1
2013-08-04Merge remote-tracking branch 'remotes/origin/master' into str-remove-nullErick Tryzelaar-30/+55
2013-08-04std: replace str::as_c_str with std::c_strErick Tryzelaar-2/+2
2013-08-04Integrate new arm patch and fix an LLVM bugAlex Crichton-1/+3
Thanks @luqama!
2013-08-04Add a workaround for 8199 for nowAlex Crichton-0/+13
2013-08-04Fix setting the fixed stack segment attribute on LLVM functionsAlex Crichton-29/+38
At the same time create a more robust wrapper to try to prevent this type of issue from cropping up in the future.
2013-08-04Fix build issues once LLVM has been upgradedAlex Crichton-1/+2
* LLVM now has a C interface to LLVMBuildAtomicRMW * The exception handling support for the JIT seems to have been dropped * Various interfaces have been added or headers have changed
2013-08-02librustc: Disallow "unsafe" for external functionsPatrick Walton-1144/+1089
2013-07-28Add an atomic fence intrinsicJames Miller-0/+3
2013-07-23std: move StrUtil::as_c_str into StrSliceErick Tryzelaar-5/+3
2013-07-21Avoid blocks for static allocas and loading the closure environmentBjörn Steinbrink-0/+2
These blocks were required because previously we could only insert instructions at the end of blocks, but we wanted to have all allocas in one place, so they can be collapse. But now we have "direct" access the the LLVM IR builder and can position it freely. This allows us to use the same trick that clang uses, which means that we insert a dummy "marker" instruction to identify the spot at which we want to insert allocas. We can then later position the IR builder at that spot and insert the alloca instruction, without any dedicated block. The block for loading the closure environment can now also go away, because the function context now provides the toplevel block, and the translation of the loading happens first, so that's good enough. Makes the LLVM IR a bit more readable, saving a bunch of branches in the unoptimized code, which benefits unoptimized builds.
2013-07-20librustc: Remove `pub extern` and `priv extern` from the language.Patrick Walton-1/+1
Place `pub` or `priv` on individual items instead.
2013-07-19debuginfo: Cleaned up style issues for pull request.Michael Woerister-1/+1
2013-07-19debuginfo: Support for tuple-style enums (WIP)Michael Woerister-1/+15
2013-07-19debuginfo: Added support for c-style enums.Michael Woerister-2/+19
2013-07-19debuginfo: Began refactoring of composite type handling.Michael Woerister-0/+8
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-0/+1
2013-06-29Great renaming: propagate throughout the rest of the codebaseCorey Richardson-6/+5
2013-06-28Add a depth counter to llvm::type_to_str to work around infinite llvm types.Michael Sullivan-6/+16
2013-06-28Add Float to llvm::type_to_str.Michael Sullivan-0/+1
2013-06-25Change finalize -> drop.Luqman Aden-4/+4
2013-06-22Fix warnings in transJames Miller-2/+0
2013-06-22Finish up Type refactoringJames Miller-35/+12
2013-06-22More Type refactoringsJames Miller-12/+0
2013-06-22Start refacting LLVM Type handlingJames Miller-9/+14
2013-06-22Change calls for TypeName stuff to methodsJames Miller-2/+9
2013-06-22Methodize TypeNamesJames Miller-104/+64
2013-06-21vec: rm old_iter implementations, except BaseIterDaniel Micay-1/+1
The removed test for issue #2611 is well covered by the `std::iterator` module itself. This adds the `count` method to `IteratorUtil` to replace `EqIter`.
2013-06-21librust: cleanup warnings (except 1)James Miller-3/+1
2013-06-19rustc: Dispose of LLVM passes in test casesBrian Anderson-0/+3
2013-06-17Fixed rebase fallout .Vadim Chugunov-2/+0
2013-06-17Refactoring and tidy warnings cleanup.Vadim Chugunov-5/+6
2013-06-17Fixed remaining issues to pass debug-test/* tests.Vadim Chugunov-0/+8
Made debugger scripts source line insensitive.
2013-06-17Fixed compile warnings.Vadim Chugunov-4/+4
Fixed whitespace "errors".
2013-06-17Move "return" basic block after all other function blocks.Vadim Chugunov-0/+6
2013-06-17Made the while DebugContext mutable, not just created_* hashesVadim Chugunov-18/+25
Disabled create_arg
2013-06-17Use DIBuilder in debuginfoVadim Chugunov-2/+183
2013-06-13Don't run passes again on JIT codeAlex Crichton-2/+0
These passes are already run beforehand, no need to do them twice.
2013-06-13Revert "Revert "Have JIT execution take ownership of the LLVMContextRef""Alex Crichton-3/+11
This reverts commit 19adece68b00bd1873499cca6f1537750608d769.
2013-06-13Revert "Revert "Remove all usage of the global LLVMContextRef""Alex Crichton-64/+7
This reverts commit 541c657a738006d78171aa261125a6a46f283b35.
2013-06-13Revert "Remove all usage of the global LLVMContextRef"Brian Anderson-7/+64
This reverts commit 779191cd4b8719e8efdf69fb6da93e2a8905ca1d. Conflicts: src/librustc/middle/trans/base.rs src/librustc/middle/trans/common.rs
2013-06-13Revert "Have JIT execution take ownership of the LLVMContextRef"Brian Anderson-11/+3
This reverts commit 5c5095d25e3652c434c8d4ec178e6844877e3c2d. Conflicts: src/librusti/rusti.rc