Skip to content

Openssl fixes#350

Merged
alexp-sssup merged 3 commits intomasterfrom
openssl_fixes
Mar 4, 2026
Merged

Openssl fixes#350
alexp-sssup merged 3 commits intomasterfrom
openssl_fixes

Conversation

@yuri91
Copy link
Member

@yuri91 yuri91 commented Mar 3, 2026

No description provided.

@yuri91 yuri91 added the hydra Run hydra on this PR label Mar 3, 2026
@yuri91 yuri91 force-pushed the openssl_fixes branch 2 times, most recently from 2b62ac9 to 983f779 Compare March 3, 2026 16:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses build/runtime issues (notably seen with OpenSSL) in the Cheerp-modified LLVM tree by tightening SROA legality checks, relaxing an overly strict debug assertion in registerization, and teaching identical code folding how to compare fence instructions.

Changes:

  • Prevent SROA integer-widening from proceeding on non-byte-addressable targets when it would require creating illegal integer widths (e.g. i24) for mem-intrinsic slices.
  • Stop VertexColorer::iterativeDeepening from asserting when called with an exhausted IterationsCounter.
  • Add Instruction::Fence handling to IdenticalCodeFolding::equivalentInstruction.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
llvm/lib/Transforms/Scalar/SROA.cpp Adds a legality gate to avoid creating illegal integer slice widths in NBA (non-byte-addressable) mode.
llvm/lib/CheerpUtils/Registerize.cpp Disables a debug assertion that can fire when the iteration budget is zero.
llvm/lib/CheerpUtils/IdenticalCodeFolding.cpp Adds equivalence logic for fence instructions (ordering + sync scope).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

lowerBound = lowerBoundOnNumberOfColors(/*forceEvaluation*/true);
}
assert(counter.remaining() > 0);
//assert(counter.remaining() > 0);
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving the old assertion commented out makes the intent unclear and leaves dead code behind. Prefer either removing it entirely or replacing it with an explicit guard/early return when counter.remaining() == 0 (and, if useful, a short comment explaining why 0 iterations is a valid input).

Suggested change
//assert(counter.remaining() > 0);

Copilot uses AI. Check for mistakes.
Comment on lines +2179 to +2182
uint64_t SliceBits = (RelEnd - RelBegin) * 8;
// CHEERP: disallow weird integer sizes like i24 from being created
if (!DL.isByteAddressable() && !DL.isLegalInteger(SliceBits))
return false;
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a regression test for the new non-byte-addressable DataLayout behavior here (e.g., a module with datalayout including 'b' and a 3-byte memintrinsic slice) to ensure SROA no longer tries integer widening that would require creating illegal integer types like i24.

Copilot uses AI. Check for mistakes.
@alexp-sssup alexp-sssup merged commit d8635e9 into master Mar 4, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hydra Run hydra on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants