about summary refs log tree commit diff
path: root/src/test/mir-opt/inline
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-2644/+0
2023-01-01Reenable limited top-down MIR inliningJakob Degen-71/+98
2022-12-25Give the correct track-caller location with MIR inlining.Camille GILLOT-10/+10
2022-12-09Remove unneeded field from `SwitchTargets`Jakob Degen-4/+4
2022-12-06make retagging work even with 'unstable' placesRalf Jung-4/+0
2022-12-01Disable top-down inliningJakob Degen-78/+217
2022-11-26Rewrite dest prop.Jakob Degen-77/+33
This fixes a number of correctness issues from the previous version. Additionally, we use a new strategy which has much better performance charactersitics and also finds more opportunities to apply the optimization.
2022-11-25Refine instruction_set inline rulesLokathor-21/+56
Previously an exact match of the `instruction_set` attribute was required for an MIR inline to be considered. This change checks for an exact match *only* if the callee sets an `instruction_set` in the first place. When the callee does not declare an instruction set then it is considered to be platform agnostic code and it's allowed to be inline'd into the caller.
2022-11-02Ban dashes in miropt test file namesJakob Degen-890/+890
2022-10-08Rollup merge of #102778 - nbdd0121:mir, r=tmiaskoMatthias Krüger-0/+67
Fix MIR inlining of asm_unwind The MIR inlining currently doesn't handle inline asm's unwind edge correctly. This code will cause ICE: ```rust struct D; impl Drop for D { fn drop(&mut self) {} } #[inline(always)] fn foo() { let _d = D; unsafe { std::arch::asm!("", options(may_unwind)) }; } pub fn main() { foo(); } ``` This PR fixes this issue. I also take the opportunity to extract common code into a method.
2022-10-07Fix testGary Guo-10/+11
2022-10-07Fix MIR inlining of asm_unwindGary Guo-0/+66
2022-10-06Remove `mir::CastKind::Misc`ouz-a-1/+1
2022-09-26address reviewb-naber-17/+17
2022-09-17Auto merge of #98588 - b-naber:valtrees-cleanup, r=lcnrbors-3/+3
Use only ty::Unevaluated<'tcx, ()> in type system r? `@lcnr`
2022-09-14address review againb-naber-94/+7
2022-09-13Use tcx.hir() utils for spans in MIR building.Camille GILLOT-20/+20
This corrects the `span_with_body` in the case of closures, which was incorrectly shortened to the `def_span`.
2022-09-13rebaseb-naber-2/+2
2022-09-13bless testsb-naber-6/+93
2022-09-04Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTHJakob Degen-83/+1
2022-08-28Use the declaration's SourceInfo for FnEntry retags, not the outermostBen Kimock-2/+2
2022-08-23./x.py test --blessTomasz Miąsko-42/+16
2022-08-22bless mir-opt testsNilstrieb-185/+185
2022-08-17Ignore substs when checking inlining history.Camille GILLOT-0/+25
2022-08-06./x.py test --blessTomasz Miąsko-24/+22
2022-08-02Avoid invalidating the CFG in MirPatch.Jakob Degen-108/+0
As a part of this change, we adjust MirPatch to not needlessly create unnecessary resume blocks.
2022-07-28bless mir opt testsNilstrieb-928/+928
2022-07-12add new rval, pull deref earlyouz-a-7/+7
2022-07-09tweak names and output and blessRalf Jung-77/+73
2022-07-07Shorten span for closures.Camille GILLOT-41/+41
2022-07-01Ignore test with panic=abort.Camille GILLOT-12/+14
2022-06-30Skip inlining if there are normalization issues.Camille GILLOT-0/+57
2022-06-30Check history earlier.Camille GILLOT-11/+38
2022-06-15fix inline_into_box_place testDrMeepster-19/+23
2022-06-15remove box derefs from codgenDrMeepster-23/+39
2022-06-14fix wrong evaluation in clippyb-naber-4/+4
2022-06-14address reviewb-naber-4/+4
2022-06-14manually bless 32-bit mir-opt testsb-naber-6/+6
2022-06-14implement valtrees as the type-system representation for constant valuesb-naber-6/+6
2022-05-30validate derefer, run derefer inside generatorouz-a-3/+119
2022-05-23Refactor call terminator to always hold a destination placeJakob Degen-28/+24
2022-05-13Rollup merge of #96989 - cjgillot:defpath-use, r=davidtwcoMatthias Krüger-18/+94
Be more precise than DefPathData::Misc. This variant was used for two unrelated things. Let's make this cleaner.
2022-05-12Bless mir-opt tests.Camille GILLOT-18/+94
2022-05-12Add mir-opt test.Camille GILLOT-0/+157
2022-05-06bless mir-optRalf Jung-3/+3
2022-05-04Generate an intermediate temporary for `Drop` constants.Oli Scherer-4/+12
To limit the fallout from this, don't do this for the last (or only) operand in an rvalue.
2022-04-25Auto merge of #96116 - ouz-a:mir-opt, r=oli-obkbors-2/+10
Make derefer work everwhere Follow up work on previous PR's #95649 and #95857. r? rust-lang/mir-opt _Co-Authored-By: `@oli-obk_`
2022-04-20Rollup merge of #93313 - tmiasko:uninhabited, r=tmandryDylan DPC-25/+24
Check if call return type is visibly uninhabited when building MIR The main motivation behind the change is to expose information about diverging calls to the generator transform and match the precision of drop range tracking which already understands that call expressions with visibly uninhabited types diverges. This change should also accept strictly more programs than before. That is programs that were previously rejected due to errors raised by control-flow sensitive checks in a code that is no longer considered reachable. Fixes #93161.
2022-04-16fix CI errouz-a-0/+1
2022-04-16Make derefer work everwhereouz-a-3/+10
Co-Authored-By: Oli Scherer <332036+oli-obk@users.noreply.github.com>