Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8834117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:56:24+00:00 2026-06-14T08:56:24+00:00

For a basic block I want to change conditional jump to an unconditional jump.

  • 0

For a basic block I want to change conditional jump to an unconditional jump. So if a basic block had two successors I want to remove the edge to one of the successor. I want the basic block to directly jump to one of the successor. How can I do that?

To illustrate my point, I want to change

      A
    /  \
   /    \
  B      C

to

     A
      \
       \
        C
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T08:56:26+00:00Added an answer on June 14, 2026 at 8:56 am

    I think the simplest way will be just to create a new unconditional branch instruction, then replace the old one with it. So, something like:

    #include "llvm/Transforms/Utils/BasicBlockUtils.h"
    
    BranchInst* Old = ...
    BranchInst* New = BranchInst::Create(Old->getSuccessor(X));
    ReplaceInstWithInst(Old, New);
    

    Where X is 0 or 1, depending if you want the “true” branch or the “false” branch.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basic doubt...If QTP generates vbscript code as we record actions, can't we directly write
Basic question.. had to ask. Any help will be appreciated. Q: Why can't I
I have this very basic tabbed block: $('.tabbed-section .panel').hide(); $('.tabbed-section .panel:first').show(); $('.tabbed-section .tabs li:first').addClass('active');
How do you change the color scheme of a basic ComboBox UI? I what
I only have very basic knowledge on Javascript and I want to be able
So I thought I had a good basic understanding of exception-handling in Java, but
My basic task is to import parts of data from one single file, into
I can't get server side includes to work. I simply want to include one
The basic idea of a masterpage is simple -- you have a block of
I am doing a basic UIView animation using block code. I am simply moving

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.