Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name LLVM anonymous constants by a hash of their contents #108446

Merged
merged 2 commits into from
Mar 1, 2023

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Feb 25, 2023

This makes the names stable between different versions of a crate unlike the AllocId naming, making LLVM IR comparisons with llvm-diff more practical.

@rustbot
Copy link
Collaborator

rustbot commented Feb 25, 2023

r? @compiler-errors

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 25, 2023
@rust-log-analyzer

This comment has been minimized.

@Zoxc
Copy link
Contributor Author

Zoxc commented Feb 25, 2023

This could use a perf run.

@compiler-errors
Copy link
Member

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 25, 2023
@bors
Copy link
Contributor

bors commented Feb 25, 2023

⌛ Trying commit b897b2d with merge 42cfb62b5da9c9311876a72c252393b2f47a6904...

@bors
Copy link
Contributor

bors commented Feb 26, 2023

☀️ Try build successful - checks-actions
Build commit: 42cfb62b5da9c9311876a72c252393b2f47a6904 (42cfb62b5da9c9311876a72c252393b2f47a6904)

1 similar comment
@bors
Copy link
Contributor

bors commented Feb 26, 2023

☀️ Try build successful - checks-actions
Build commit: 42cfb62b5da9c9311876a72c252393b2f47a6904 (42cfb62b5da9c9311876a72c252393b2f47a6904)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (42cfb62b5da9c9311876a72c252393b2f47a6904): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.0% [2.0%, 2.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.9% [-3.9%, -3.9%] 1
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 26, 2023
@compiler-errors
Copy link
Member

My initial suspicion was "what if two constants have different allocations but hash to the same contents", but my understanding from this thread is that @oli-obk said this is fine: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/LLVM.20anonymous.20constants/near/337952486

r=me on the impl, but would like another confirmation so

r? @oli-obk

@rustbot rustbot assigned oli-obk and unassigned compiler-errors Mar 1, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Mar 1, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Mar 1, 2023

📌 Commit b897b2d has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 1, 2023
@bors
Copy link
Contributor

bors commented Mar 1, 2023

⌛ Testing commit b897b2d with merge 253490c9cb8b1b9486c0d8ef00a2ca80a3d5f92c...

@bors
Copy link
Contributor

bors commented Mar 1, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 1, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Mar 1, 2023

@bors retry building llvm: could not create temporary file whilst writing archive: no more archived files

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 1, 2023
@bors
Copy link
Contributor

bors commented Mar 1, 2023

⌛ Testing commit b897b2d with merge 609496e...

@bors
Copy link
Contributor

bors commented Mar 1, 2023

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 609496e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 1, 2023
@bors bors merged commit 609496e into rust-lang:master Mar 1, 2023
@rustbot rustbot added this to the 1.69.0 milestone Mar 1, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (609496e): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
-2.6% [-3.7%, -1.5%] 2
Improvements ✅
(secondary)
-2.1% [-3.6%, -0.8%] 16
All ❌✅ (primary) -2.6% [-3.7%, -1.5%] 2

Cycles

This benchmark run did not return any relevant results for this metric.

@rust-log-analyzer
Copy link
Collaborator

The job dist-i686-mingw failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[2591/3021] Building CXX object tools/bugpoint/CMakeFiles/bugpoint.dir/OptimizerDriver.cpp.obj
[2592/3021] Linking CXX executable bin\llvm-config.exe
[2593/3021] Linking CXX static library lib\libLLVMInterpreter.a
[2594/3021] Linking CXX static library lib\libLLVMHexagonCodeGen.a
FAILED: lib/libLLVMHexagonCodeGen.a 
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E rm -f lib\libLLVMHexagonCodeGen.a && D:\a\rust\rust\mingw32\bin\ar.exe qc lib\libLLVMHexagonCodeGen.a  lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/BitTracker.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonAsmPrinter.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonBitSimplify.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonBitTracker.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonBlockRanges.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonBranchRelaxation.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonCFGOptimizer.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonCommonGEP.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonConstExtenders.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonConstPropagation.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonCopyToCombine.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonEarlyIfConv.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonExpandCondsets.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonFixupHwLoops.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonFrameLowering.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonGenExtract.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonGenInsert.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonGenMux.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonGenPredicate.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonHardwareLoops.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonHazardRecognizer.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonInstrInfo.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonISelDAGToDAG.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonISelDAGToDAGHVX.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonISelLowering.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonISelLoweringHVX.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonLoopIdiomRecognition.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonMachineFunctionInfo.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonMachineScheduler.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonMCInstLower.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonNewValueJump.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonOptAddrMode.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonOptimizeSZextends.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonPeephole.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonRDFOpt.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonRegisterInfo.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonSelectionDAGInfo.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonSplitConst32AndConst64.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonSplitDouble.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonStoreWidening.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonSubtarget.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonTargetMachine.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonTargetObjectFile.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonTargetTransformInfo.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonVectorCombine.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonVectorLoopCarriedReuse.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonVectorPrint.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonVExtract.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonVLIWPacketizer.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/RDFCopy.cpp.obj lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/RDFDeadCode.cpp.obj && D:\a\rust\rust\mingw32\bin\ranlib.exe lib\libLLVMHexagonCodeGen.a && cd ."
D:\a\rust\rust\mingw32\bin\ar.exe: could not create temporary file whilst writing archive: no more archived files
[2595/3021] Linking CXX static library lib\libLLVMGlobalISel.a
[2596/3021] Linking CXX static library lib\libLLVMDWARFLinker.a
[2597/3021] Building CXX object tools/bugpoint/CMakeFiles/bugpoint.dir/CrashDebugger.cpp.obj
[2598/3021] Linking CXX static library lib\libLLVMBPFCodeGen.a
[2598/3021] Linking CXX static library lib\libLLVMBPFCodeGen.a
[2599/3021] Linking CXX static library lib\libLLVMMSP430CodeGen.a
[2600/3021] Building CXX object tools/bugpoint/CMakeFiles/bugpoint.dir/ExtractFunction.cpp.obj
[2601/3021] Linking CXX static library lib\libLLVMPasses.a
thread 'main' panicked at '
ninja: build stopped: subcommand failed.
command did not execute successfully, got: exit code: 1

build script failed, must exit now', C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1cd66030c949c28d\cmake-0.1.48\src\lib.rs:975:5
 finished in 366.653 seconds
Build completed unsuccessfully in 0:08:57

@Zoxc Zoxc deleted the named-allocs branch March 2, 2023 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants