summary refs log tree commit diff
path: root/src/librustc/lib
AgeCommit message (Collapse)AuthorLines
2013-09-16switch Drop to `&mut self`Daniel Micay-4/+4
2013-09-15debuginfo: Fix style nits for pull request.Michael Woerister-1/+0
2013-09-15debuginfo: Support for recursive types.Michael Woerister-0/+4
2013-09-10debuginfo: Wrapped namespace facilities of llvm::DIBuilderMichael Woerister-0/+8
2013-09-09add `noalias` attribute to ~ return valuesDaniel Micay-0/+6
2013-09-04debuginfo: Support for by-value arguments (still excluding some cases of ↵Michael Woerister-0/+6
self arguments)
2013-09-04debuginfo: Support for variables captured in closures and closure type ↵Michael Woerister-0/+19
descriptions.
2013-08-30Tweak pass management and add some more optionsAlex Crichton-4/+2
The only changes to the default passes is that O1 now doesn't run the inline pass, just always-inline with lifetime intrinsics. O2 also now has a threshold of 225 instead of 275. Otherwise the default passes being run is the same. I've also added a few more options for configuring the pass pipeline. Namely you can now specify arguments to LLVM directly via the `--llvm-args` command line option which operates similarly to `--passes`. I also added the ability to turn off pre-population of the pass manager in case you want to run *only* your own passes.
2013-08-26Rewrite pass management with LLVMAlex Crichton-44/+77
Beforehand, it was unclear whether rust was performing the "recommended set" of optimizations provided by LLVM for code. This commit changes the way we run passes to closely mirror that of clang, which in theory does it correctly. The notable changes include: * Passes are no longer explicitly added one by one. This would be difficult to keep up with as LLVM changes and we don't guaranteed always know the best order in which to run passes * Passes are now managed by LLVM's PassManagerBuilder object. This is then used to populate the various pass managers run. * We now run both a FunctionPassManager and a module-wide PassManager. This is what clang does, and I presume that we *may* see a speed boost from the module-wide passes just having to do less work. I have no measured this. * The codegen pass manager has been extracted to its own separate pass manager to not get mixed up with the other passes * All pass managers now include passes for target-specific data layout and analysis passes Some new features include: * You can now print all passes being run with `-Z print-llvm-passes` * When specifying passes via `--passes`, the passes are now appended to the default list of passes instead of overwriting them. * The output of `--passes list` is now generated by LLVM instead of maintaining a list of passes ourselves * Loop vectorization is turned on by default as an optimization pass and can be disabled with `-Z no-vectorize-loops`
2013-08-20auto merge of #8328 : alexcrichton/rust/llvm-head, r=brsonbors-23/+4
The first commit message is pretty good, but whomever reviews this should probably also at least glance at the changes I made in LLVM. I basically reorganized our pending patch queue to be a bit more organized and clearer in what needs to go where. After this, our queue would be: * Add the `no-split-stack` attribute * Add the `fixedstacksegment` attribute * Add split-stacks for arm android * Add split-stacks for arm linux * Add split stacks for mips Then there's a patch which I added to get rust to build at all on LLVM-head, and I'm not quite sure why it's there, but nothing seems to be crashing for now! (famous last words). Otherwise, I just updated code to reflect the changes I made in LLVM with the only major change being the advent of the new `no_split_stack` attribute. This is work towards #1226, but someone more familiar with the code should probably actually assign the attribute to the appropriate functions. Also as a bonus, I've verified that this closes #5774
2013-08-20Fix LLVM compilation issues and use the new attrsAlex Crichton-23/+4
This implements #[no_split_stack] and also changes #[fast_ffi] to using the new "fixedstacksegment" string attribute instead of integer attribute.
2013-08-19Add externfn macro and correctly label fixed_stack_segmentsNiko Matsakis-0/+4
2013-08-19Issue #3678: Remove wrappers and call foreign functions directlyNiko Matsakis-0/+5
2013-08-16debuginfo: Generate template type parameters for generic functions.Michael Woerister-0/+10
Conflicts: src/librustc/lib/llvm.rs src/librustc/middle/trans/debuginfo.rs src/rustllvm/RustWrapper.cpp src/rustllvm/rustllvm.def.in
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`.